cx

guppylang.std.quantum.cx(control: qubit, target: qubit) None[source]

Controlled-X gate command.

cx(control, target)

Qubit ordering: [control, target]

\[\begin{split}\mathrm{CX}= \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}\end{split}\]