qiskit_superstaq.custom_gates

Attributes

AQTiToffoliGate

Classes

AQTiCCXGate

A subclass of the iCCXGate for AQT where the control state is "00".

AceCR

Active Cancellation Echoed Cross Resonance gate, supporting polarity switches and sandwiches.

DDGate

The Dipole-Dipole (DD) gate, which performs the dipole-dipole interaction between two

ParallelGates

A single gate combining a collection of concurrent gate(s) acting on different qubits.

StrippedCZGate

The Stripped CZ gate is a regular CZ gate when the rz angle = 0.

ZZSwapGate

The ZZ-SWAP gate, which performs the ZZ-interaction followed by a SWAP.

iCCXGate

An iCCX gate which consists of a Toffoli gate and a subsequent controlled phase gate.

iCCXdgGate

The conjugate transpose of the iCCXGate (\(iCCXGate^{\dagger} = iCCXdgGate\)).

iXGate

The iX gate (a single qubit Pauli-X gate with a global phase of i).

iXdgGate

The conjugate transpose of the iXGate (\(iXGate^{\dagger} = iXdgGate\)).

Module Contents

class qiskit_superstaq.custom_gates.AQTiCCXGate(label: str | None = None)

Bases: iCCXGate

A subclass of the iCCXGate for AQT where the control state is “00”.

class qiskit_superstaq.custom_gates.AceCR(rads: str | float = np.pi / 2, sandwich_rx_rads: float = 0, label: str | None = None)

Bases: qiskit.circuit.Gate

Active Cancellation Echoed Cross Resonance gate, supporting polarity switches and sandwiches.

The typical AceCR in the literature is a positive half-CR, then X on “Z side”, then negative half-CR (where “Z side” and “X side” refer to the two sides of the underlying ZX interactions).

inverse() AceCR

Inverts the AceCR gate.

Returns:

The inverse AceCR gate.

name = 'acecr'

Return the name.

params

The parameters of this Instruction. Ideally these will be gate angles.

class qiskit_superstaq.custom_gates.DDGate(theta: float, label: str | None = None)

Bases: qiskit.circuit.Gate

The Dipole-Dipole (DD) gate, which performs the dipole-dipole interaction between two electrons. Part of the EeroQ native gateset.

The unitary for a DD gate parametrized by angle \(\theta\) is:

\[\begin{split}\begin{bmatrix} e^{-i \theta} & . & . & . \\ . & e^{i \theta}cos{theta} ie^{i \theta}sin{theta} & . \\ . & ie^{i \theta}sin{theta} e^{i \theta}cos{theta} & . \\ . & . & . & e^{-i \theta} \\ \end{bmatrix}\end{split}\]

where ‘.’ means ‘0’.

inverse() DDGate

Inverts the DD gate.

Returns:

The inverse DD gate.

class qiskit_superstaq.custom_gates.ParallelGates(*component_gates: qiskit.circuit.Gate, label: str | None = None)

Bases: qiskit.circuit.Gate

A single gate combining a collection of concurrent gate(s) acting on different qubits.

inverse() ParallelGates

Inverts parallel gates.

Returns:

The inverse parallel gates.

component_gates: tuple[qiskit.circuit.Gate, Ellipsis] = ()
name

Return the name.

num_qubits = 0

Return the number of qubits.

class qiskit_superstaq.custom_gates.StrippedCZGate(rz_rads: float, label: str | None = None)

Bases: qiskit.circuit.Gate

The Stripped CZ gate is a regular CZ gate when the rz angle = 0.

It is the gate that is actually being performed by Sqorpius, and it is corrected into a CZ gate by RZ gates afterwards if the rz angle is nonzero.

inverse() StrippedCZGate

Inverts the stripped CZ gate.

Returns:

The inverse Stripped CZ gate.

class qiskit_superstaq.custom_gates.ZZSwapGate(theta: float, label: str | None = None)

Bases: qiskit.circuit.Gate

The ZZ-SWAP gate, which performs the ZZ-interaction followed by a SWAP.

ZZ-SWAPs are useful for applications like QAOA or Hamiltonian Simulation, particularly on linear- or low- connectivity devices. See https://arxiv.org/pdf/2004.14970.pdf for an application of ZZ-SWAP networks.

The unitary for a ZZ-SWAP gate parametrized by ZZ-interaction angle \(\theta\) is:

\[\begin{split}\begin{bmatrix} 1 & . & . & . \\ . & . & e^{i \theta} & . \\ . & e^{i \theta} & . & . \\ . & . & . & 1 \\ \end{bmatrix}\end{split}\]

where ‘.’ means ‘0’. For \(\theta = 0\), the ZZ-SWAP gate is just an ordinary SWAP.

inverse() ZZSwapGate

Inverts the ZZ-SWAP gate.

Returns:

The inverse ZZ-SWAP gate.

class qiskit_superstaq.custom_gates.iCCXGate(label: str | None = None, ctrl_state: str | int | None = None)

Bases: qiskit.circuit.ControlledGate

An iCCX gate which consists of a Toffoli gate and a subsequent controlled phase gate.

The two qubit controlled phase gate uses an angle of rotation of \(\frac{\pi}{2}\) on the second qubit with the first qubit acting as the control. That is, it is a composite gate of the following instructions:

q_0: ──■───■───────
       │   │P(π/2)
q_1: ──■───■───────
     ┌─┴─┐
q_2: ┤ X ├─────────
     └───┘
class qiskit_superstaq.custom_gates.iCCXdgGate(label: str | None = None, ctrl_state: str | int | None = None)

Bases: qiskit.circuit.ControlledGate

The conjugate transpose of the iCCXGate (\(iCCXGate^{\dagger} = iCCXdgGate\)).

class qiskit_superstaq.custom_gates.iXGate(label: str | None = None)

Bases: qiskit.circuit.Gate

The iX gate (a single qubit Pauli-X gate with a global phase of i).

It is a special case of when the RX gate’s input rotation angle is \(-\pi\):

\[\begin{split}\begin{bmatrix} 0 & i \\ i & 0 \\ \end{bmatrix}\end{split}\]
control(num_ctrl_qubits: int = 1, label: str | None = None, ctrl_state: str | int | None = None) qiskit.circuit.ControlledGate

Method to return a controlled version of the gate.

Parameters:
  • num_ctrl_qubits – Number of control qubits for the gate. Defaults to 1.

  • label – An optional label for the gate. Defaults to None.

  • ctrl_state – The control qubit state to use (e.g. ‘00’). Defaults to None.

Returns:

The qiskit.circuit.ControlledGate version of the gate.

inverse() iXdgGate

Inverts iX gate.

Returns:

The inverse iX gate.

class qiskit_superstaq.custom_gates.iXdgGate(label: str | None = None)

Bases: qiskit.circuit.Gate

The conjugate transpose of the iXGate (\(iXGate^{\dagger} = iXdgGate\)).

control(num_ctrl_qubits: int = 1, label: str | None = None, ctrl_state: str | int | None = None) qiskit.circuit.ControlledGate

Method to return a controlled version of the gate.

Parameters:
  • num_ctrl_qubits – Number of control qubits for the gate. Defaults to 1.

  • label – An optional label for the gate. Defaults to None.

  • ctrl_state – The control qubit state to use (e.g. ‘00’). Defaults to None.

Returns:

The qiskit.circuit.ControlledGate version of the gate.

inverse() iXGate

Inverts the iXdgGate.

Returns:

The inverse of the iXdgGate.

qiskit_superstaq.custom_gates.AQTiToffoliGate