The Controlled-Z gate, also called the CZ gate, is a two-qubit operation in quantum computing that applies a phase of minus one to the basis state in which both qubits are 1 and leaves the other three basis states unchanged. It is one of the most common entangling gates in quantum circuits and, together with single-qubit gates, forms a universal gate set.
Unlike most controlled operations, the CZ gate is symmetric between its two qubits: neither qubit is truly the control or the target, because swapping their roles produces the same matrix. This symmetry, its diagonal form and its natural fit with many hardware interactions make it the native two-qubit gate on numerous superconducting and neutral-atom processors.
How the CZ gate acts on two qubits
The CZ gate multiplies the amplitude of the |11⟩ component by −1 and does nothing else. In the computational basis its matrix is diag(1, 1, 1, −1), a diagonal unitary operator, so it never moves population between basis states. It only changes the relative phase of one component of the two-qubit state.
The following table lists the action of the gate on each computational basis state.
| Input state | Output state | Phase applied |
|---|---|---|
| |00⟩ | |00⟩ | None |
| |01⟩ | |01⟩ | None |
| |10⟩ | |10⟩ | None |
| |11⟩ | −|11⟩ | π (sign flip) |
Because a global phase is unobservable but a relative phase is not, the gate has visible effects only on superpositions. When both qubits start in the state |+⟩, the CZ gate produces a maximally entangled state that is locally equivalent to a Bell state. This is the basic mechanism behind graph states and cluster states, where CZ gates link many qubits prepared in |+⟩.
The CZ gate can be read as a controlled Pauli-Z: if the first qubit is 1, apply Z to the second qubit. Since Z applied to the first qubit conditioned on the second gives exactly the same matrix, the control and target labels are interchangeable. Circuit diagrams often draw the gate as two filled dots joined by a vertical line to express this symmetry.
Relationship between the CZ gate and the CNOT gate
The CZ gate and the CNOT gate are equivalent up to single-qubit Hadamard gates. Placing a Hadamard on the target qubit before and after a CZ yields a CNOT, because the Hadamard maps the Z basis onto the X basis. Compilers therefore treat the two gates as interchangeable entanglers and choose whichever the hardware executes natively.
The table below compares the CZ gate with neighboring two-qubit gates that appear in the same circuits.
| Gate | Matrix form | Symmetric in qubits | Relation to CZ |
|---|---|---|---|
| CZ gate | Diagonal | Yes | Reference |
| CNOT gate | Permutation | No | CZ with Hadamards on target |
| Controlled phase | Diagonal | Yes | CZ is the case φ = π |
| iSWAP gate | Swaps with phase | Yes | Two iSWAPs plus single-qubit gates give CZ |
| SWAP gate | Permutation | Yes | Not entangling; needs three CNOTs |
The CZ gate is also a member of the Clifford gates. It maps Pauli operators to Pauli operators under conjugation, for example turning X on one qubit into X⊗Z. As a consequence, circuits built only from CZ, Hadamard and phase gates can be simulated efficiently on a classical computer, as the Gottesman–Knill theorem states. Adding a non-Clifford gate such as the T gate restores full quantum power.
Physical implementations of the CZ gate
Hardware platforms realize the CZ gate through conditional phase accumulation: the energy of the |11⟩ state is shifted relative to the others for a controlled time, so that only that state picks up a phase of π. The detailed physics differs considerably between technologies, which shapes gate duration and error rates.
The table summarizes typical mechanisms and indicative performance; exact figures depend strongly on device generation and calibration.
| Platform | Physical mechanism | Typical duration | Typical fidelity range |
|---|---|---|---|
| Superconducting transmons | Flux-tuned |11⟩ to |20⟩ resonance | 20 to 100 ns | 99 to 99.9 % |
| Neutral atoms | Rydberg blockade | 0.2 to 1 μs | 99 to 99.5 % |
| Trapped ions | Geometric phase via motional modes | 50 to 500 μs | 99 to 99.9 % |
| Silicon spin qubits | Pulsed exchange interaction | 50 to 500 ns | 98 to 99.5 % |
In superconducting processors, a flux pulse brings the |11⟩ level into resonance with the non-computational |20⟩ level, and a full oscillation returns the population while leaving a phase of π. Leakage into |20⟩ is a characteristic error source of this scheme. In neutral-atom arrays, the Rydberg blockade prevents two nearby atoms from being excited together, which produces the required conditional phase.
Using the CZ gate in circuit design
Circuit designers use the CZ gate wherever entanglement or a conditional phase is needed, and compilers translate other two-qubit gates into it when it is the native operation. Its diagonal form makes it commute with other diagonal gates such as Z, S, T and further CZ gates, which gives optimizers freedom to reorder and parallelize operations and to reduce circuit depth.
The following decision table connects common design situations with the role the CZ gate plays.
| Situation | Recommended approach | Reason |
|---|---|---|
| Hardware lists CZ as native | Compile CNOTs into CZ plus Hadamards | Avoids an extra decomposition layer |
| Building cluster or graph states | Apply CZ between |+⟩ qubits | One CZ per graph edge |
| Syndrome extraction in surface codes | Use CZ with basis changes on ancillas | Matches native gates and keeps schedules short |
| Many diagonal gates in sequence | Merge and reorder CZ blocks | Commutation lowers circuit depth |
| Arbitrary controlled phase needed | Use a controlled phase gate instead | CZ provides only φ = π |
In measurement-based quantum computing, the CZ gate is the only entangling operation required: a large cluster state is prepared with CZ gates, and the computation then proceeds by single-qubit measurements. In variational algorithms, layers of CZ gates often serve as the fixed entangling block between parameterized rotation layers.
Errors, limitations and common misconceptions
Two-qubit gates are usually the dominant error source in current processors, and the CZ gate is no exception: its error rate is typically five to ten times higher than that of single-qubit gates on the same device. Errors come from decoherence during the gate, imperfect phase calibration, leakage and crosstalk with neighboring qubits.
- Conditional phase error: the accumulated phase deviates from π, producing a partial entangler that calibration must correct.
- Single-qubit phase drift: each qubit also picks up a local phase during the pulse, which is compensated by virtual Z rotations.
- Leakage: population that remains outside the computational subspace corrupts later operations and error correction.
- Misconception about direction: treating one qubit as the real control is unnecessary, because the gate is symmetric.
- Misconception about observability: applying CZ to a basis state has no measurable effect, so tests must use superpositions.
The simple explanation
A qubit can be in a blend of 0 and 1. The CZ gate looks at two qubits at once. If both are 1, it flips a hidden sign on that part of the blend. In every other case it does nothing.
That hidden sign seems minor, but it matters. It ties the two qubits together, so they can no longer be described separately. This link is called entanglement. It is the extra ingredient that makes quantum computers more powerful than ordinary ones. Think of two dancers who agree on one secret move: alone they look normal, together they move as a pair.
How it is used in practice
A research team runs an error-corrected memory experiment on a superconducting processor whose only native two-qubit gate is the CZ gate. Each round of the surface code requires every measurement qubit to interact with four data qubits. The compiler converts the textbook CNOT schedule into CZ gates surrounded by Hadamard gates on the measurement qubits and then cancels redundant Hadamards.
Each CZ pulse lasts about 60 nanoseconds, and the team calibrates the conditional phase to within a fraction of a degree. After tuning, the average CZ error is roughly 0.5 percent, low enough that increasing the code size reduces the logical error rate. The result shows that a well-calibrated CZ gate can serve as the entire entangling layer of a fault-tolerant architecture.