deltakit.circuit.gates.CXSWAP#

class deltakit.circuit.gates.CXSWAP(control: UT | T, target: VT | T, *, tag: str | None = None)#

Bases: ControlledGate[Qubit[T], Qubit[T]]

A combination CX-and-SWAP gate. This gate is kak-equivalent to the ISWAP gate, but preserves X/Z noise bias. Equivalent to CNOT from target to control, immediately followed by another CNOT from control to target.

Notes

Stabilizer Generators:
X_ -> XX
Z_ -> _Z
_X -> X_
_Z -> ZZ
Unitary Matrix:
\[\begin{split}\begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 0 \end{pmatrix}\end{split}\]

Methods#

CXSWAP.from_consecutive

Yield an class instance for each pair in a flattened sequence of data.

CXSWAP.stim_targets

Get the stim gate targets which define this operation.

CXSWAP.transform_qubits

Transform this gates's qubits according to the id mapping.