Basic circuits · GHZ / entanglement
GHZ state preparation
A reusable GHZ state preparation circuit with simulator-only evidence.
Exact & formalUpdated
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.
Step 1 of 4 · H
Probability of each outcome after this step
- 000050%
- 000150%
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.
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.
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%.
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.
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 StudioGHZ preparation extends the Bell-state pattern to a small register and makes the distinction between local operations and global correlation visible.
TakesNothingWhat joins here
Nothing goes in, and that is what this entry is: a pipeline starts here. There is no upstream to choose — what you pick is what comes after.
Nothing in the Atlas meets this end.
Returns4 qubitsWhat joins here
Returns a 4-qubit register a next stage can take. This is the end that joins.
1 entry lines up on shape, composition unverified. Named below.
Prepares a state. Nothing goes in, and what comes out is a register another stage can take. See all 13 →
The widths and types line up. What is not established is everything a width does not carry — the basis convention, the normalisation, the state each was written to start from — so this is not a claim that the two compose.
The GHZ state on wires, , extends the Bell-state pattern: one Hadamard on wire 0 creates the branch, , 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 and — 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.
TakesNothingWhat joins here
Nothing goes in, and that is what this entry is: a pipeline starts here. There is no upstream to choose — what you pick is what comes after.
Nothing in the Atlas meets this end.
Returns4 qubitsWhat joins here
Returns a 4-qubit register a next stage can take. This is the end that joins.
1 entry lines up on shape, composition unverified. Named below.
Prepares a state. Nothing goes in, and what comes out is a register another stage can take. See all 13 →
The widths and types line up. What is not established is everything a width does not carry — the basis convention, the normalisation, the state each was written to start from — so this is not a claim that the two compose.
- Qubits
- 4
- Depth
- 2 layers
- Outcomes
- 0000 / 1111
- State
- (|0000⟩ + |1111⟩)/√2
- Ideal support
- 2 of 16 outcomes
- Evidence
- Simulator only
Hon q[0]CXon q[0], q[1]CXon q[0], q[2]CXon q[0], q[3]
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.
Nobody has reviewed this record for gaps yet.
import pennylane as qml
dev = qml.device("default.qubit", wires=4)
@qml.qnode(dev)
def ghz_state():
qml.Hadamard(wires=0)
for wire in range(1, 4):
qml.CNOT(wires=[0, wire])
return qml.probs(wires=range(4))
FINAL_CIRCUIT = ghz_stateWhere the map uses this
This record is an instance of an object the map names, so these are the processes that consume or produce one. None of them is about this record in particular.
State you can prepare 5 of 34 processes
- Quantum linear solve hands one back
- Prepare an input state hands one back
- Amplify a success branch hands one back
- Estimate an observable takes one
- Minimise the objective over the parameters hands one back
Related entries
- Bell state measurement
Basic circuits
- Hadamard gate
Gates
References
- Quantum Computation and Quantum Information: 10th Anniversary Edition
Michael A. Nielsen and Isaac L. Chuang · 2010
Standard graduate textbook covering the single- and two-qubit gate definitions, matrix identities, and circuit primitives this record states.