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
HomeLessonsGate comparison
Side-by-side comparison

CNOT vs CZ: How the Two Workhorse Entangling Gates Differ

CNOT and CZ both create entanglement from a superposition input, and both are locally equivalent — you can turn one into the other by sandwiching with Hadamards. But they differ in what they do to the computational basis and in how hardware platforms usually implement them. Which one belongs in your circuit depends more on symmetry and compilation than on raw power.

CNOT Gate (Controlled-X)gateControlled-Z Gategate

Side by side

AspectCNOT Gate (Controlled-X)Controlled-Z Gate
Visible effectFlips the target qubit when the control is ∣1⟩. Leaves it alone when the control is ∣0⟩.Flips the sign of ∣11⟩. Leaves every other computational basis state alone.
Symmetry between the two qubitsAsymmetric — there is a distinguished control and a distinguished target.Symmetric — both qubits play the same role. Swap them and the gate is identical.
When the input is a product stateOutput is still a product state. Only when the control is in superposition does CNOT actually entangle.Output is still a product state. Only when at least one qubit is in superposition does CZ actually entangle.
Relation to each otherCNOT = (I ⊗ H) · CZ · (I ⊗ H). Apply Hadamard to the target before and after a CZ to get CNOT.CZ = (I ⊗ H) · CNOT · (I ⊗ H). The basis-change identity runs both ways.
Native hardware implementationNative on many platforms (trapped ions, some superconducting architectures), but on many superconducting-transmon devices CNOT is compiled from CZ or from cross-resonance pulses.Native on fixed-frequency transmon processors that use tunable-coupler or flux-activated two-qubit interactions. Compilation often prefers CZ because it is symmetric.
Where you see it in canonical algorithmsBell states, quantum teleportation, the Deutsch algorithm oracle, quantum error correction stabilizer measurements.Phase kickback patterns, cluster states for measurement-based quantum computing, variational ansätze, surface-code stabilizers.

When to reach for which

  • Use CNOT when the circuit has a natural 'control decides, target flips' reading — most conditional-classical-logic translations land here.
  • Use CZ when the circuit is symmetric in the two qubits, or when you are building phase-kickback / variational ansatz structures.
  • On superconducting hardware, let the compiler choose: if the native gate is CZ, a hand-written CNOT will compile to CZ + Hadamards anyway.
  • In error correction, CZ is often preferred because the two-qubit symmetry simplifies stabilizer bookkeeping.
  • For teaching or proof-reading circuits, CNOT is easier to reason about by hand — it directly mirrors classical reversible logic.

Common trap

It is tempting to think CNOT entangles and CZ doesn't, because CZ doesn't flip any bits. It looks like nothing happened. But measure the post-CZ state in any non-computational basis and the correlations show up immediately — CZ entangles just as thoroughly as CNOT. The illusion comes from computational-basis measurement hiding the phase.

Related

  • CNOT Gate (Controlled-X) gate — full lesson
  • Controlled-Z Gate gate — full lesson
  • Algorithm that uses this pattern: bell state
  • Algorithm that uses this pattern: phase kickback
  • Algorithm that uses this pattern: teleportation
  • Experiment: bell
  • Experiment: phase kickback
  • Browse the full gate reference