Controlled-Z Gate
The controlled-Z gate is the two-qubit gate that does almost nothing — and that "almost" is the whole point. It leaves three of the four computational basis states exactly where they are and stamps a single minus sign on : in matrix form it is , the most economical entangler in the toolbox. Because and , applying to a target only when the control is produces precisely that lone sign flip. Diagonal in the computational basis, CZ inherits every convenience a diagonal matrix can offer — it commutes with itself and with all -type operators, it is Hermitian, and it is its own inverse. Two features make it the gate theorists reach for. The first is symmetry: the phase appears exactly when both qubits are excited, a condition blind to which one you call the control. Swap the two wires and the matrix is unchanged, — in sharp contrast to CNOT, where control and target play visibly different roles. That symmetry is why CZ is the native edge of cluster and graph states: lay down a qubit at each vertex, a CZ across each edge, and because all the CZ gates commute the order never matters. The second feature is its kinship with CNOT. Conjugating the target by a Hadamard turns one into the other, , on the strength of the single identity — one of the most-used circuit equivalences in all of quantum computing. And physically CZ is not a paper abstraction: a conditional phase is the native two-qubit interaction of superconducting transmons and of Rydberg neutral atoms, so on much of today's hardware CZ is what the machine actually does, and CNOT is the thing built out of it.
- The controlled-Z gate applies a Pauli to a target conditioned on the control being ; in the computational basis it is — a single sign flip on and nothing else.
- CZ is fully symmetric between its two qubits: there is no real distinction between control and target, so , making it the natural entangling edge of cluster states and measurement-based computation.
- It is Hadamard-conjugated CNOT, , because ; any platform with CZ has CNOT for two extra single-qubit gates.
- Being diagonal, CZ commutes with all -type operators and with itself, and it is Hermitian and self-inverse: and .
- CZ is maximally entangling — has concurrence — and with single-qubit gates plus a non-Clifford phase it completes a universal gate set.
- Key idea: CZ is the diagonal gate — a single sign flip on — that is symmetric in its two qubits and equals Hadamard-conjugated CNOT, .
Where this lives today
The controlled-Z gate is not a blackboard idealization but a daily workhorse of running quantum hardware. On superconducting processors — the platform behind Google's and IBM's largest machines — a tunable coupler or a flux pulse brings the level into a brief avoided crossing with the higher state, so the pair returns having collected a conditional phase: that is a CZ, executed in tens of nanoseconds, and Google's Sycamore-class devices use exactly this controlled-phase interaction as their entangling gate. Neutral-atom arrays realize CZ through the Rydberg blockade, where exciting one atom shifts its neighbor's levels enough to block a second excitation, imprinting the conditional phase; two-qubit CZ fidelities above 99.5% have been reported in these systems, among the highest for any platform. In the measurement-based paradigm, CZ is the only entangling operation needed: a photonic or atomic cluster state is grown by applying CZ across the edges of a graph, after which the entire computation runs on single-qubit measurements alone — the model that underlies much of photonic quantum computing. And in fault tolerance, CZ-type gates weave the entangling layers of the surface code, whose stabilizer checks are measured by short CZ or CNOT circuits between data and ancilla qubits. The open frontier is fidelity and speed: pushing two-qubit CZ error rates below the surface-code threshold, and suppressing the leakage into -like states that is the characteristic failure mode of the very avoided crossing that makes the gate work.
The physical picture
Think of CZ as a conditional minus sign. It watches both qubits and does exactly nothing — until it finds both of them in state , at which moment it multiplies that one amplitude by . Because , the two qubits acquire a phase only when they "agree" on being excited, and only then. Every other basis state passes through untouched. The gate's entire content is one entry of a diagonal matrix, and the first figure is that content drawn as a table: the phase that each basis state collects, with the lone flipped corner picked out in red.
Seen from the other side, the same gate is a familiar bit-flip in disguise. Rotate the target's measurement axis with a Hadamard — which sends the axis onto the axis, the algebraic content of — and the conditional phase flip becomes a conditional bit flip. That is the entire relationship between CZ and CNOT: they are one operation viewed in two frames, interchangeable for the price of a Hadamard on each side of the target. This is more than a curiosity. On hardware where the native interaction produces a conditional phase, CNOT is never built directly; it is always CZ wrapped in Hadamards. The second figure is that identity as a circuit, with the symmetric two-dot CZ symbol on the left and the asymmetric control-and-target CNOT on the right.
Two consequences flow from these pictures and organize the rest of the article. Because CZ is diagonal, a whole network of CZ gates commutes and can be applied in any order — the property that makes cluster-state preparation parallelizable and order-independent. And because a Hadamard on either factor rewrites a phase flip as a bit flip, "which qubit is the control," "phase or bit flip," and "CZ or CNOT" are all frame choices, not physical facts. The same operation looks like a pure phase gate in the computational basis and a genuine flip in the basis.
The core equations
The definition is a single diagonal matrix. Fixing the ordering for rows and columns turns the abstract "conditional " into four numbers on the diagonal, three of them and one of them .
where: — the controlled-Z, equivalently the controlled-phase gate at angle ; the diagonal entries — the phases collected by ; the lone — the sign flip on . Read off at once: CZ is diagonal, so it is Hermitian, and squaring the diagonal gives all , so it is unitary and self-inverse. The same gate written in projector form makes the word "controlled" literal: apply the identity to the target when the control is , and apply when the control is . This is the general controlled- template with .
where: — projectors onto the two control states; — identity applied to the target when the control is ; — Pauli applied to the target when the control is . The reading: this is the definitional form, and Derivation A expands it back into equation (1). Applied to a basis state, CZ returns the same state times a phase that is exactly when both bits are . Written as it wears its symmetry on its sleeve, since .
where: — the computational-basis values of control and target; — the collected phase, equal to iff . The reading: the exponent is symmetric in , so the "control" and "target" labels are pure convention — the fact drawn in the first figure. Conjugating the target factor by a Hadamard converts the conditional into a conditional , giving the CZ–CNOT equivalence. It is the single most-used circuit identity involving CZ.
where: — the Hadamard on the target qubit; — the controlled-NOT with the same control and target. The reading: the whole identity rests on and (Derivation B), so the control projectors survive untouched while becomes . Because the only nontrivial eigenvalue is and , CZ is at once Hermitian and its own inverse — it undoes itself, so a CZ applied twice is the identity.
where: — conjugate transpose; — the identity. The reading: a diagonal real matrix is Hermitian automatically, and squaring returns , so CZ is an involution like every Pauli. CZ is the member of a continuous one-parameter family, the controlled-phase gate. This family is the diagonal building block of the quantum Fourier transform and interpolates smoothly from the identity to CZ.
where: — the conditional phase; gives , gives controlled-, gives CZ. The reading: turning up from continuously "switches on" the entangling power, which is maximal at the endpoint . Finally CZ can be written as the exponential of an Ising-type generator, the form that connects it to the physical interaction used to realize it on hardware.
where: — the excited-state projector, so picks out the subspace; — matrix exponential of the diagonal generator. The reading: the exponent equals , and delivers exactly the one sign flip (Derivation A, closing steps).
The goal is to start from the plain-English rule "apply to the target only when the control is ," write it as the operator , and grind it into the explicit diagonal matrix — then read three structural facts straight off the result: the compact phase formula , the manifest symmetry between control and target, and the Ising generator that hardware actually implements. Every later property of CZ is a corollary of this one computation, so it is worth doing by hand once.
Step 1. Take the projector form of equation (2) and evaluate each tensor block using and . The first term is — the top-left block, acting when the control is . Why: a projector onto zeroes out the lower block, so this term only touches the sector, where it does nothing.
Step 2. The second term is — the bottom-right block, carrying the that acts when the control is . Adding the two block-diagonal pieces gives , exactly equation (1). Why: the two control sectors are orthogonal, so the sum simply stacks them, and only the entry — control and target — inherits the from .
Step 3. Read the phase off the diagonal: the entry for is iff , which is compactly , equation (3). Since for bits, the phase is invariant under exchanging the two qubits, so with the SWAP operator . Why: this is the symmetry that distinguishes CZ from CNOT — there is no distinguished control, and the same figure is drawn whether you enter the table by row or by column.
Step 4. Recover the generator form. Let , so ; then , and exponentiating a diagonal operator exponentiates each entry: . Why: this is CZ as up to single-qubit phases, the shape of the physical coupling that superconducting and trapped-ion hardware turn on for a fixed time to realize the gate. *Verified: each basis state returns to itself with phase , reproducing ; the generator gives on and elsewhere, with no residual global phase in this convention.*
Go deeper · Derivation B · 1 minTurning a controlled-Z into a controlled-NOT
The aim is to prove the workhorse identity from the ground up, showing that it rests on the single fact and that the Hadamard only ever touches the target factor, leaving the control projectors alone. This is the reason any hardware whose native gate is a conditional phase can nonetheless run the standard CNOT-based circuits: you never build CNOT directly, you build CZ and dress the target with two Hadamards.
Step 1. Insert the projector form of CZ and let the Hadamards act only on the target tensor factor: . Why: the control projectors live on the first factor, where acts as the identity, so they pass through untouched — only the target operators get sandwiched.
Step 2. Evaluate the two sandwiches. Hadamard is involutory, , so ; and Hadamard maps the phase-flip to the bit-flip, , because swaps the and axes on the Bloch sphere. Why: is the one nontrivial input — geometrically it is a rotation about the diagonal axis that exchanges and , algebraically it is checked by multiplying the three matrices.
Step 3. Substitute back: , which is by definition the controlled-NOT. Why: the conditional has become a conditional while the control structure is identical, completing the identity; running it in reverse, , since is its own inverse. *Verified: and by direct matrix multiplication; the resulting operator is , and the identity is symmetric because .*
Go deeper · Derivation C · 1 minWhy controlled-Z is maximally entangling
The purpose here is to show quantitatively that CZ, for all its apparent laziness, is a maximally entangling gate: fed the unentangled product it outputs a state whose two qubits are as entangled as two qubits can be. We compute the output, put it into Schmidt form to expose the entanglement, evaluate the concurrence to get a single number, and trace out one qubit to confirm the leftover is maximally mixed — three independent certificates of the same fact.
Step 1. Expand the input and apply the phase rule. The product is a flat superposition over all four basis states; CZ flips the sign of the term alone, giving . Why: only one amplitude changes, yet — as the next steps show — that single sign is enough to destroy every tensor-product factorization the input had.
Step 2. Group by the first qubit to find the Schmidt decomposition: , using and . Why: and are orthonormal, so this is a genuine Schmidt form with two equal coefficients — equal Schmidt weights are the signature of maximal entanglement.
Step 3. Certify with the concurrence. For the concurrence is ; here , , so . Why: is the maximum, attained only by Bell-class states, so CZ acting on is provably maximally entangling — the single sign flip does all the work.
Step 4. Trace out the second qubit. From the Schmidt form the reduced state is , the maximally mixed single-qubit state, with von Neumann entropy bit. Why: a maximally mixed marginal is the operational meaning of maximal entanglement — each qubit alone carries zero information, all of it living in the correlations. *Verified: output has unit norm, Schmidt coefficients , concurrence , and reduced state with bit — three consistent certificates of maximal entanglement.*
Limiting cases
CZ sits at one endpoint of the continuous controlled-phase family and collapses to simpler objects in special cases; the table collects the ones worth remembering.
| Case | Result | Meaning |
|---|---|---|
| Zero phase | no conditional phase at all; CZ is the far endpoint of this family, so the entangling power switches on continuously with | |
| Controlled- | the member, the diagonal gate that appears in the quantum Fourier transform between qubit pairs | |
| Self-inverse | Hermitian and its own inverse, since on the only nontrivial entry — two CZ gates cancel | |
| Either qubit | trivial on any computational-basis input containing a ; entanglement arises only on superpositions that reach | |
| Clifford conjugation | CZ maps Paulis to Paulis, so it is a Clifford gate — efficiently classically simulable by Gottesman–Knill |
Worked examples
1 · Controlled-Z is maximally entangling (fully worked)
Apply CZ to the product state . Show the output is entangled, and quantify how entangled with the concurrence and the reduced-state entropy.
Step 1. Expand the input over the computational basis: , an equal superposition with all four amplitudes . Apply CZ, which by equation (3) flips only the sign: .
Step 2. Test separability by attempting to factor. Grouping on the first qubit gives : the second qubit is when the first is but when the first is , so no single product can reproduce it. The state is entangled.
Step 3. Quantify. With amplitudes , , the concurrence is , the maximum. Tracing out either qubit leaves , entropy . CZ turns a product state into a maximally entangled one: , one bit of entanglement entropy.
2 · A Bell state from controlled-Z (fully worked)
Starting from , apply , then CZ, then a Hadamard on the second qubit. Show you land on the Bell state , and connect the circuit to the CNOT construction.
Step 1. The two Hadamards make a flat superposition: .
Step 2. CZ flips the sign: . Regroup on the first qubit as .
Step 3. Apply to the second qubit, using and : the state becomes .
Step 4. Sanity-check against CNOT. Since , the circuit equals — a Hadamard on the control followed by CNOT, which is exactly the textbook Bell-pair generator. The CZ circuit reproduces and matches the standard CNOT construction, as the conjugation identity guarantees.
3 · Controlled-Z is a Clifford gate
Conjugate the Pauli by CZ and show the result is again a Pauli. Explain why this places CZ in the Clifford group.
Step 1. Use the projector form and act on . Because flips the control, commutes past the CZ only at the cost of a on the target: the direct computation gives .
Step 2. The three natural generators transform as , , and , — every Pauli maps to a Pauli. CZ normalizes the Pauli group, so it is a Clifford gate.
Step 3. Consequence: circuits built only from CZ, CNOT, , , and Pauli gates are stabilizer circuits, efficiently simulable on a classical computer by the Gottesman–Knill theorem. Entangling power alone is not quantum advantage — CZ entangles maximally yet is classically tractable; universality needs a non-Clifford gate such as .
Physics of the portrait
The controlled-Z gate has no single inventor and no dramatic discovery story — it emerged, quietly and repeatedly, wherever people asked what the simplest two-qubit gate could be. Its biography is the biography of the two-qubit gate itself: from Deutsch's abstract networks, through the proof that a single entangler suffices for universality, to the day a conditional phase became something a chip in a dilution refrigerator does millions of times a second.
Origins · 2 mincontrolled-Z gate and how this was discovered
The controlled-Z gate is less a discovery than a convergence. When David Deutsch recast computation as networks of quantum logic gates in 1989, the controlled operations he needed were exactly of this shape — a unitary on a target, switched by the state of a control. In 1995 a landmark paper by Barenco, Bennett, Cleve, DiVincenzo, Margolus, Shor, Sleator, Smolin and Weinfurter proved that any two-qubit entangling gate, together with arbitrary single-qubit gates, is universal for quantum computation, putting CZ and CNOT on equal footing as canonical two-qubit primitives — related, as they emphasized, by nothing more than local Hadamards. The controlled-phase gate then took on a life the CNOT never could: in 2001 Robert Raussendorf and Hans Briegel built the one-way (measurement-based) quantum computer on cluster states, which are made by initializing every qubit in and firing a CZ across each edge of a lattice — a construction that works because all CZ gates commute and the order is irrelevant, the symmetry that CNOT lacks. Meanwhile experimentalists found that nature prefers the phase. Superconducting qubits acquire a conditional phase when the level is tuned near the non-computational state and back, and neutral atoms acquire one through the Rydberg blockade, so on both platforms CZ (or its tunable cousin ) is the native entangler and CNOT is the derived gate. The 2009 demonstration by DiCarlo and collaborators of a two-qubit superconducting processor running Grover and Deutsch–Jozsa used exactly this controlled-phase interaction. What began as a line in a matrix is now, on much of the world's quantum hardware, the physical thing the machine knows how to do.
Going further
Texts. Nielsen & Chuang, Quantum Computation and Quantum Information, §4.3 (controlled operations) and §4.5 (universality) · Preskill, Lecture Notes for Physics 219, Ch. 5–6 · Watrous, The Theory of Quantum Information, Ch. 2 · Wilde, Quantum Information Theory, Ch. 3 · Kitaev, Shen & Vyalyi, Classical and Quantum Computation, §8 · Mermin, Quantum Computer Science, Ch. 2 · Barenco et al., "Elementary gates for quantum computation," Phys. Rev. A 52, 3457 (1995) · Raussendorf & Briegel, "A one-way quantum computer," Phys. Rev. Lett. 86, 5188 (2001).
Provenance. The matrix, projector, and phase forms and the identities are standard (Nielsen & Chuang §4.3). A verifier should confirm: (1) the expansion of the controlled- form into ; (2) giving ; (3) and ; (4) the generator form via and ; (5) with concurrence and reduced state ; (6) the Clifford conjugation ; (7) the Bell circuit . No empirical or fabricated numbers are used; hardware figures are cited as reported ranges.
Prerequisites. Pauli Gates (X, Y, Z) · Hadamard Gate · Controlled-U Gates · Quantum Circuit Model. Leads to. CNOT Gate · Circuit Identities and Equivalences · Universal Gate Sets · SWAP Gate.
Ask the tutor: ask me to entangle any two-qubit state with CZ, convert between CZ and CNOT circuits, or build a cluster state edge by edge.
Is the controlled-Z gate really symmetric, or is that just a convention?
It is genuinely symmetric, not a convention. The formal statement is , where is the SWAP that exchanges the two qubits: conjugating CZ by SWAP returns CZ itself. The reason is that the collected phase is and for bits, so the condition "both qubits are " does not care which qubit is which. This is exactly where CZ differs from CNOT — swapping the qubits of a CNOT gives a different CNOT with control and target reversed. So calling one qubit of a CZ the "control" is a labelling choice with no physical content, which is precisely why CZ is the natural edge in a graph state, where edges are undirected.
If CZ and CNOT are related by Hadamards, why keep both around?
Because different questions and different hardware favour different frames. CNOT reads naturally as classical logic — "flip the target if the control is set" — which is why algorithms and pseudocode are usually written with it. CZ reads naturally as a phase and is symmetric, which makes graph-state and cluster-state constructions far cleaner: you draw an undirected edge, not a directed arrow. On hardware the choice is made for you: superconducting and neutral-atom devices produce a conditional phase natively, so CZ is the real gate and CNOT is , costing two extra single-qubit gates. Since is its own inverse the translation runs both ways, so you are free to think in whichever frame is clearer and let the compiler convert.
How can a single sign flip create maximal entanglement?
Because entanglement is about relative phases between the branches of a superposition, not about how many amplitudes you touch. On a computational-basis state CZ does almost nothing, but on the lone minus sign it plants on makes the second qubit's state depend on the first — it is when the first qubit is and when it is . That correlation cannot be undone by any local operation, and the concurrence works out to exactly , the maximum. The lesson is that a well-placed phase is the whole game: you do not need to move probability around to entangle, you need to make the branches disagree about a phase.
What is the controlled-phase gate, and how does CZ fit into it?
The controlled-phase gate is the one-parameter family : it collects a tunable phase on instead of a fixed . At it is the identity (no interaction); at it is the controlled- gate used in the quantum Fourier transform; and at it is CZ, since . So CZ is the maximal-phase endpoint of the family, and the family is exactly what continuously "dials up" the entangling power from zero to maximum. On hardware this is more than notation — the physical interaction usually produces a phase proportional to the time it is left on, so for arbitrary is often easier to make than a perfectly calibrated CZ, and CZ is just the setting .
Is CZ enough to build a universal quantum computer?
Not by itself, and the reason is instructive. CZ together with all single-qubit gates does generate the full two-qubit unitary group, and by the Barenco et al. universality theorem an entangler plus single-qubit gates is universal for unitary computation in principle. But if you restrict the single-qubit gates to the Clifford set (Hadamard and the phase gate ), then CZ, being itself a Clifford gate, gives you only stabilizer circuits — and the Gottesman–Knill theorem says those are efficiently simulable on a classical computer, so no quantum advantage. To cross into genuinely hard computation you must add a non-Clifford gate, canonically the gate. CZ supplies the entanglement; supplies the "magic" that makes the circuit classically intractable.
Why is a conditional phase the native gate on so much hardware?
Because the simplest always-on two-qubit interactions are diagonal energy shifts. When two qubits sit close enough to interact, the most common coupling is an energy penalty (or shift) that depends on whether both are excited — a -type term. Let such a term evolve for a fixed time and the state accumulates a phase relative to the others: that is precisely , and tuning the time or the coupling to gives CZ. In transmons this is engineered as a brief avoided crossing between and a higher level; in Rydberg atoms it is the blockade shift. A bit-flip interaction that would give CNOT directly is comparatively unnatural, which is why the phase gate is primary and the flip gate is derived.
Do the CZ gates in a cluster state really commute, and why does it matter?
Yes — every CZ is diagonal in the computational basis, and diagonal matrices commute, so any two CZ gates (even on overlapping qubits) can be applied in either order with identical result. This matters enormously for building large entangled resource states. To make a cluster state you initialize every qubit in and apply a CZ across each edge of a graph; because the gates commute, you can fire them all in parallel, in any grouping, without worrying about scheduling — the final state depends only on which edges are present, not on the order they were added. That order-independence is what makes cluster-state preparation robust and parallelizable, and it is a property CNOT-based constructions simply do not have, since CNOTs sharing a qubit generally do not commute.