QuantumSimulator
Interactive Course
Interactive chapters from intuition to mastery
Structured Lessons
Eight modules with formulas and self-checks
Quantum Brain
Navigate lessons, laws, gates, devices, and tools
Guided Experiments
Hands-on circuits that teach one idea each
Circuit Lab
Build circuits, run them, and see the results
Gate Reference
Quick reference for all quantum gates
Cryostat Studio
3D cryostat design and simulation
Component Catalog
Browse all cryostat components
System Checks
Check your design for errors
Menu
physics
Interactive Course
Interactive chapters from intuition to mastery
Structured Lessons
Eight modules with formulas and self-checks
Quantum Brain
Navigate lessons, laws, gates, devices, and tools
Guided Experiments
Hands-on circuits that teach one idea each
simulator
Circuit Lab
Build circuits, run them, and see the results
Gate Reference
Quick reference for all quantum gates
wiringStudio
Cryostat Studio
3D cryostat design and simulation
Component Catalog
Browse all cryostat components
System Checks
Check your design for errors
Home/Quantum Physics/Lessons/Controlled-Z Gate
CZ

Controlled-Z Gate

Entanglement2-qubitctrl-Z

Flips the phase of the ∣11⟩ component and leaves all other components unchanged.

Intuition

CZ applies a Z gate (phase flip) to the target qubit when the control qubit is ∣1⟩. The remarkable property of CZ is that it is completely symmetric between the two qubits. It does not matter which qubit you call the control and which you call the target. The gate multiplies the ∣11⟩ component of the state by −1 and leaves ∣00⟩,∣01⟩, and ∣10⟩ unchanged. This symmetry makes CZ a natural fit for hardware where qubit interactions are symmetric.

Matrix representation
diag(1,1,1,−1)
Action on states
∣11⟩→−∣11⟩,other basis states unchanged
Circuit
q0q1HHCZ
Full technical statement

CZ is a diagonal matrix with entries (1, 1, 1, −1). A diagonal matrix acts on each basis state independently by multiplying it by the corresponding entry. So CZ multiplies ∣00⟩ by 1, ∣01⟩ by 1, ∣10⟩ by 1, and ∣11⟩ by −1. The symmetry CZ = CZ^T (the matrix equals its own transpose) means there is no physical distinction between the two qubits. CZ is related to CNOT by the identity CZ = (I⊗H) CNOT (I⊗H), which means you can convert between them by applying Hadamard to the target. CZ is a native gate on superconducting transmon processors.

What changes in measurements

The joint phase structure of the two-qubit state changes. This can create or modify correlations between the qubits.

What stays hidden until later

Creates entanglement when either qubit is in superposition, because the phase flip on ∣11⟩ cannot be factored into independent single-qubit operations.

Bloch sphere

Applies a conditional phase flip. The gate is symmetric between the two qubits, so there is no geometric distinction between control and target.

Step-by-step example

CZ as a symmetric entangling gate

  1. 1Start with ∣+⟩⊗∣+⟩=(∣00⟩+∣01⟩+∣10⟩+∣11⟩)/2. Both qubits are in equal superposition.
  2. 2Apply CZ. Only the ∣11⟩ term gets multiplied by −1.
  3. 3The result is (∣00⟩+∣01⟩+∣10⟩ − ∣11⟩/2.
  4. 4This state is entangled. You cannot write it as a product of two independent single-qubit states.
  5. 5Swap which qubit you call control and target. The result is identical, confirming CZ’s symmetry.
Where this gate appears
  • Native entangling gate on superconducting transmon processors
  • Graph state preparation, where one CZ is applied per edge of the graph
  • Measurement-based quantum computation
  • Alternative to CNOT when the hardware interaction is naturally symmetric
Connected gates
  • CZ = (I⊗H) CNOT (I⊗H) — CZ is CNOT with Hadamards applied to the target before and after
  • CZ is symmetric: swapping the two qubit labels gives the same gate
  • CP(π) = CZ — CZ is the special case of controlled-phase with angle π
  • CZ is its own inverse: CZ² = I, because (−1)² = 1
Tempting but wrong

It is tempting to think CZ has a designated control and target qubit, like CNOT does. That sounds plausible because circuit diagrams usually draw one qubit with a control dot. What actually happens is that the CZ matrix treats both qubits identically. The −1 phase lands on ∣11⟩, which is symmetric in the two qubit labels. Both qubits play the same role.

Why this gate matters for what comes next

CZ is the native entangling gate on many superconducting quantum processors. Understanding CZ and how to convert between CZ and CNOT using Hadamard gates lets you write circuits that map efficiently onto real hardware without unnecessary overhead.

Test your understanding

Why is CZ symmetric between the two qubits while CNOT is not?

Quick reference →↗ Nielsen and Chuang, Quantum Computation and Quantum Information
←
Previous
U3 Gate
Next
Controlled-Phase
→
← Back to all lessons