← Atlas

Basic circuits · GHZ / entanglement

GHZ state preparation

A reusable GHZ state preparation circuit with simulator-only evidence.

Exact & formalUpdated

View frozen graph

A small worked example, computed in your browser. It is not a result from this record's papers.

A 4-qubit GHZ state

4 qubits, preparing (|0000⟩ + |1111⟩) / √2.

q0q1q2q3Step 1 of 4 · HHStep 2 of 4 · CXCXStep 3 of 4 · CXCXStep 4 of 4 · CXCX

Step 1 of 4 · H

Probability of each outcome after this step

  • 000050%
  • 000150%
  1. Puts qubit 0 into an equal superposition of |0⟩ and |1⟩. The other three are still plain |0⟩.

    Probability spreads from 1 outcome to 2. All 2 are equally likely.

  2. Copies qubit 0's value onto qubit 1 — not by reading it, which would destroy the superposition, but by making the pair agree in both branches at once.

    Probability moves: 1 outcome appears that had none, 1 drops to zero, 2 carry probability now. Up: 0011 0.0% → 50.0%. Down: 0001 50.0% → 0.0%. 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.

  3. The same again onto qubit 2: the agreement extends down the chain one qubit at a time.

    Probability moves: 1 outcome appears that had none, 1 drops to zero, 2 carry probability now. Up: 0111 0.0% → 50.0%. Down: 0011 50.0% → 0.0%.

  4. And onto qubit 3, closing the chain. All four now agree in both branches, which is what makes this a GHZ state rather than four separate superpositions.

    Probability moves: 1 outcome appears that had none, 1 drops to zero, 2 carry probability now. Up: 1111 0.0% → 50.0%. Down: 0111 50.0% → 0.0%.

Readout Measuring all four qubits always gives 0000 or 1111, each about half the time.

Open in Studio
  • Steps4
  • Wires4
  • Qubits4
  • Depth2 layers
  • Outcomes0000 / 1111
  • Papers1

A part this method uses, worked through

This page says Bell-state — here is a concrete, runnable instance of it.

A Bell pair

2 qubits, preparing (|00⟩ + |11⟩) / √2.

q0q1HCX

Where it ends up

  • 0050%
  • 1150%

Measuring both qubits always gives 00 or 11, each about half the time, and never 01 or 10.

Open this part in Studio

The GHZ state on n=4n=4 wires, 12(∣0000⟩+∣1111⟩)\frac{1}{\sqrt2}(|0000\rangle+|1111\rangle), extends the Bell-state pattern: one Hadamard on wire 0 creates the branch, 12(∣0000⟩+∣1000⟩)\frac{1}{\sqrt2}(|0000\rangle+|1000\rangle), and CNOTs fan it from wire 0 to wires 1, 2, 3 in turn, each spreading the correlation until all four qubits agree. This record's check confirms the circuit structure and the ideal simulator support — probability mass only on 00000000 and 11111111 — which is what the entry's own caveat scopes: simulator evidence, not a hardware noise measurement. Unlike the Bell state, GHZ correlations are fragile: a single bit- or phase-flip error on any one of the four qubits during preparation collapses the perfect two-outcome distribution, which is exactly why GHZ fidelity is used as a standard multi-qubit benchmark for characterizing crosstalk and coherence on real devices — distinct from the ideal-circuit claim made here.

References

Exact & formal
  • Exact statevector simulation
  • Invariant & structural checks
Method
Circuit structure and ideal simulator probabilities checked for four wires.
Result
Pass · support is 0000 and 1111 in the ideal simulator.
Caveat
This public reference does not claim hardware noise validation.
PennyLane quantum operations reference ↗
Kind
curated reference
Reviewed by
LeonaQ curation pass
License
CC BY 4.0-compatible reference metadata
state preparationpennylanesimulatorentanglement

Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.