qiskit_superstaq.custom_gates ============================= .. py:module:: qiskit_superstaq.custom_gates Attributes ---------- .. autoapisummary:: qiskit_superstaq.custom_gates.AQTiToffoliGate Classes ------- .. autoapisummary:: qiskit_superstaq.custom_gates.AQTiCCXGate qiskit_superstaq.custom_gates.AceCR qiskit_superstaq.custom_gates.DDGate qiskit_superstaq.custom_gates.ParallelGates qiskit_superstaq.custom_gates.StrippedCZGate qiskit_superstaq.custom_gates.ZZSwapGate qiskit_superstaq.custom_gates.iCCXGate qiskit_superstaq.custom_gates.iCCXdgGate qiskit_superstaq.custom_gates.iXGate qiskit_superstaq.custom_gates.iXdgGate Module Contents --------------- .. py:class:: AQTiCCXGate(label: str | None = None) Bases: :py:obj:`iCCXGate` A subclass of the iCCXGate for AQT where the control state is "00". .. py:class:: AceCR(rads: str | float = np.pi / 2, sandwich_rx_rads: float = 0, label: str | None = None) Bases: :py:obj:`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). .. py:method:: inverse() -> AceCR Inverts the AceCR gate. :returns: The inverse AceCR gate. .. py:class:: DDGate(theta: float, label: str | None = None) Bases: :py:obj:`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 :math:`\theta` is: .. math:: \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} where '.' means '0'. .. py:method:: inverse() -> DDGate Inverts the DD gate. :returns: The inverse DD gate. .. py:class:: ParallelGates(*component_gates: qiskit.circuit.Gate, label: str | None = None) Bases: :py:obj:`qiskit.circuit.Gate` A single gate combining a collection of concurrent gate(s) acting on different qubits. .. py:method:: inverse() -> ParallelGates Inverts parallel gates. :returns: The inverse parallel gates. .. py:attribute:: component_gates :type: tuple[qiskit.circuit.Gate, Ellipsis] :value: () .. py:class:: StrippedCZGate(rz_rads: float, label: str | None = None) Bases: :py:obj:`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 Sqale, and it is corrected into a CZ gate by RZ gates afterwards if the rz angle is nonzero. .. py:method:: inverse() -> StrippedCZGate Inverts the stripped CZ gate. :returns: The inverse Stripped CZ gate. .. py:class:: ZZSwapGate(theta: float, label: str | None = None) Bases: :py:obj:`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 :math:`\theta` is: .. math:: \begin{bmatrix} 1 & . & . & . \\ . & . & e^{i \theta} & . \\ . & e^{i \theta} & . & . \\ . & . & . & 1 \\ \end{bmatrix} where '.' means '0'. For :math:`\theta = 0`, the ZZ-SWAP gate is just an ordinary SWAP. .. py:method:: inverse() -> ZZSwapGate Inverts the ZZ-SWAP gate. :returns: The inverse ZZ-SWAP gate. .. py:class:: iCCXGate(label: str | None = None, ctrl_state: str | int | None = None) Bases: :py:obj:`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 :math:`\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: .. parsed-literal:: q_0: ──■───■─────── │ │P(π/2) q_1: ──■───■─────── ┌─┴─┐ q_2: ┤ X ├───────── └───┘ .. py:class:: iCCXdgGate(label: str | None = None, ctrl_state: str | int | None = None) Bases: :py:obj:`qiskit.circuit.ControlledGate` The conjugate transpose of the `iCCXGate` (:math:`iCCXGate^{\dagger} = iCCXdgGate`). .. py:class:: iXGate(label: str | None = None) Bases: :py:obj:`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 :math:`-\pi`: .. math:: \begin{bmatrix} 0 & i \\ i & 0 \\ \end{bmatrix} .. py:method:: 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. :param num_ctrl_qubits: Number of control qubits for the gate. Defaults to 1. :param label: An optional label for the gate. Defaults to None. :param ctrl_state: The control qubit state to use (e.g. '00'). Defaults to None. :returns: The `qiskit.circuit.ControlledGate` version of the gate. .. py:method:: inverse() -> iXdgGate Inverts iX gate. :returns: The inverse iX gate. .. py:class:: iXdgGate(label: str | None = None) Bases: :py:obj:`qiskit.circuit.Gate` The conjugate transpose of the `iXGate` (:math:`iXGate^{\dagger} = iXdgGate`). .. py:method:: 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. :param num_ctrl_qubits: Number of control qubits for the gate. Defaults to 1. :param label: An optional label for the gate. Defaults to None. :param ctrl_state: The control qubit state to use (e.g. '00'). Defaults to None. :returns: The `qiskit.circuit.ControlledGate` version of the gate. .. py:method:: inverse() -> iXGate Inverts the `iXdgGate`. :returns: The inverse of the `iXdgGate`. .. py:data:: AQTiToffoliGate