Quantum gate reference
Every gate in the Circuit Builder explained in one place: what it does, its matrix, useful identities, where it is used and the code to write it. Qubit order follows the builder: q0 is the leftmost bit.
Reviewed November 2026.
Superposition
Bit flip
Bit and phase flip
Phase flip
Phase
Rotation
Rx(θ)RX rotation
Rotates the qubit by an angle θ about the X axis of the Bloch sphere.
Ry(θ)RY rotation
Rotates about the Y axis. Real amplitudes only, so it is the easiest way to prepare a state with chosen probabilities.
Rz(θ)RZ rotation
Rotates about the Z axis, which changes relative phase and leaves probabilities alone.
Entangling
CXCNOT gate (controlled-X)
Flips the target qubit only when the control qubit is 1. With a Hadamard it creates entanglement.
CZControlled-Z gate
Flips the sign of |11⟩ only. Symmetric: it does not matter which qubit is the control.
CP(θ)Controlled-phase gate
Multiplies |11⟩ by e^(iθ). The building block of the quantum Fourier transform.
Permutation
Reversible logic
Readout
Ready to try them? Open the Circuit Builder.