deltakit.circuit.gates.XCX#

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

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

The X-controlled X gate. First qubit is the control, second qubit is the target. Applies an X gate to the target if the control is in the |-> state.

Notes

Negates the amplitude of the |-,-> state.

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

Methods#

XCX.from_consecutive

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

XCX.stim_targets

Get the stim gate targets which define this operation.

XCX.transform_qubits

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