Gates · Controlled gate
Controlled-Z gate
A diagonal two-qubit entangling gate that applies a -1 phase exactly when both qubits are |1⟩, and is symmetric between the two qubits it acts on.
Exact & formalUpdated
A small worked example, computed in your browser. It is not a result from this record's papers.
CZ entangles without moving any probability
Two qubits, both put into |+⟩, so all four outcomes are equally likely before the gate.
Step 1 of 3 · H
Probability of each outcome after this step
- 0050%
- 0150%
Qubit 0 into an equal superposition.
Probability spreads from 1 outcome to 2. All 2 are equally likely.
Qubit 1 as well, so all four two-bit outcomes are equally likely.
Probability spreads from 2 outcomes to 4. All 4 are equally likely.
Flips the sign of the one branch where both qubits are 1, and leaves the other three alone. Not one outcome changes probability, and the two qubits are entangled afterwards — which is why a bar chart is the wrong instrument for this gate.
The outcome probabilities do not move at all. What this step changes is phase — 2 distinct relative phases across the state now — which no measurement can see until a later step turns it back into probability. This is the step that entangles the qubits: from here on no single qubit has a state of its own, only the register as a whole does.
Readout All four outcomes stay equally likely, before and after. CZ is symmetric in its two qubits — unlike CX there is no telling which one was the control — and it is the gate that builds graph states and cluster states.
Open in Studio- Steps1
- Wires2
- Qubits2
- Depth1 gate
- Outcomesphase-only, basis-preserving
- Papers1
CZ is the phase-only sibling of CX: instead of routing information from control to target, it marks the |11⟩ configuration, which makes it the natural entangling gate for graph-state and measurement-based constructions.
Takes2 qubitsWhat joins here
Takes a 2-qubit register and states no assumption about what is on it. That is the whole condition: anything returning 2 qubits can feed it.
16 entries meet this end. Named below.
Returns2 qubitsWhat joins here
Returns a 2-qubit register a next stage can take. This is the end that joins.
11 entries meet this end. Named below.
A unitary. The same register goes in and comes out, and this entry states no assumption about what is on it — which is what lets anything of the same width feed it. See all 29 →
Definition
in the ordered basis . The matrix is diagonal and, unlike , symmetric under exchanging the two qubits: has no distinguished "control" wire.
Action on basis states
Only the component picks up a sign; all other basis states are untouched. Applied to a product of superpositions it creates entanglement by correlating the relative phase with both qubits simultaneously, e.g. .
Key identities
- : conjugating the target of by Hadamard converts the bit-flip entangler into the phase-flip entangler and vice versa.
- : is its own inverse (it is a Clifford involution).
- is the special case of the controlled-phase gate .
- Applying to every edge of a graph on qubits initialized in prepares the corresponding cluster/graph state, the resource state for measurement-based quantum computation.
Takes2 qubitsWhat joins here
Takes a 2-qubit register and states no assumption about what is on it. That is the whole condition: anything returning 2 qubits can feed it.
16 entries meet this end. Named below.
Returns2 qubitsWhat joins here
Returns a 2-qubit register a next stage can take. This is the end that joins.
11 entries meet this end. Named below.
A unitary. The same register goes in and comes out, and this entry states no assumption about what is on it — which is what lets anything of the same width feed it. See all 29 →
- Qubits
- 2
- Depth
- 1 gate
- Outcomes
- phase-only, basis-preserving
- Matrix
- diag(1, 1, 1, -1)
- Symmetry
- Symmetric under q0 ↔ q1
- Relation to CX
- CZ = (I⊗H)·CX·(I⊗H)
- Gate family
- Clifford
CZon q[0], q[1]
Quantum vs classical
Classical baseline
Use a classical state-vector or matrix simulation at the same width, precision, and measurement objective.
Quantum claim
The quantum record demonstrates a state or operator behavior; it does not make classical simulation or communication costs disappear.
How to compare
Compare fidelity, samples, gate depth, noise, memory, and the cost of preparing and reading the state.
Nobody has reviewed this record for gaps yet.
OPENQASM 3.0;
include "stdgates.inc";
qubit[2] q;
cz q[0], q[1];Related entries
- Controlled-X gate
Gates
- Controlled-phase gate (CP)
Gates
- Hadamard gate
Gates
- SWAP gate
Gates
References
- Quantum Computation and Quantum Information: 10th Anniversary Edition
Michael A. Nielsen and Isaac L. Chuang · 2010
Standard reference for single- and multi-qubit gate matrices, Euler-angle decomposition, and universal gate sets.