deltakit.circuit.gates.CZSWAP#

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

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

A combination CZ-and-SWAP gate. This gate is kak-equivalent to the ISWAP gate. Equivalent to H on the target qubit, followed by CNOT from target to control, CNOT from control to target, and finally H on the control qubit.

Notes

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

Methods#

CZSWAP.from_consecutive

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

CZSWAP.stim_targets

Get the stim gate targets which define this operation.

CZSWAP.transform_qubits

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