← 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

Quantum vs classical

Classical baseline

Use a classical state-vector or matrix simulation at the same width, precision, and measurement objective.

Quantum claim

The quantum record demonstrates a state or operator behavior; it does not make classical simulation or communication costs disappear.

How to compare

Compare fidelity, samples, gate depth, noise, memory, and the cost of preparing and reading the state.

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.