qiskit_superstaq.custom_gates
Attributes
Classes
A subclass of the iCCXGate for AQT where the control state is "00". |
|
Active Cancellation Echoed Cross Resonance gate, supporting polarity switches and sandwiches. |
|
The Dipole-Dipole (DD) gate, which performs the dipole-dipole interaction between two |
|
A single gate combining a collection of concurrent gate(s) acting on different qubits. |
|
The Stripped CZ gate is a regular CZ gate when the rz angle = 0. |
|
The ZZ-SWAP gate, which performs the ZZ-interaction followed by a SWAP. |
|
An iCCX gate which consists of a Toffoli gate and a subsequent controlled phase gate. |
|
The conjugate transpose of the iCCXGate (\(iCCXGate^{\dagger} = iCCXdgGate\)). |
|
The iX gate (a single qubit Pauli-X gate with a global phase of i). |
|
The conjugate transpose of the iXGate (\(iXGate^{\dagger} = iXdgGate\)). |
Module Contents
- class qiskit_superstaq.custom_gates.AQTiCCXGate(label: str | None = None)
Bases:
iCCXGateA 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.GateActive 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).
- class qiskit_superstaq.custom_gates.DDGate(theta: float, label: str | None = None)
Bases:
qiskit.circuit.GateThe 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’.
- class qiskit_superstaq.custom_gates.ParallelGates(*component_gates: qiskit.circuit.Gate, label: str | None = None)
Bases:
qiskit.circuit.GateA 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] = ()
- class qiskit_superstaq.custom_gates.StrippedCZGate(rz_rads: float, label: str | None = None)
Bases:
qiskit.circuit.GateThe Stripped CZ gate is a regular CZ gate when the rz angle = 0.
It is the gate that is actually being performed by Sqale, 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.GateThe 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.ControlledGateAn 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.ControlledGateThe conjugate transpose of the iCCXGate (\(iCCXGate^{\dagger} = iCCXdgGate\)).
- class qiskit_superstaq.custom_gates.iXGate(label: str | None = None)
Bases:
qiskit.circuit.GateThe 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, annotated: bool | 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.
annotated – Ignored.
- Returns:
The qiskit.circuit.ControlledGate version of the gate.
- class qiskit_superstaq.custom_gates.iXdgGate(label: str | None = None)
Bases:
qiskit.circuit.GateThe conjugate transpose of the iXGate (\(iXGate^{\dagger} = iXdgGate\)).
- control(num_ctrl_qubits: int = 1, label: str | None = None, ctrl_state: str | int | None = None, annotated: bool | 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.
annotated – Ignored.
- Returns:
The qiskit.circuit.ControlledGate version of the gate.
- qiskit_superstaq.custom_gates.AQTiToffoliGate