Sign in
← Atlas
Exact & formalBasic circuitsGHZ / entanglement

GHZ state preparation

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

state preparationpennylanesimulatorentanglement

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

GHZ preparation extends the Bell-state pattern to a small register and makes the distinction between local operations and global correlation visible.

Circuit & simulation
000050%
111150%
What this takes and returns
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 12 →

Shapes fit after this, composition unverified 1

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.

Where 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 33 processes

How it works

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.

Implementation
Native
ghz_state.py
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_state
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.

Declared gaps

Nobody has reviewed this record for gaps yet.

Literature & references
Quantum Computation and Quantum Information: 10th Anniversary Edition2010 · Michael A. Nielsen and Isaac L. Chuang

Standard graduate textbook covering the single- and two-qubit gate definitions, matrix identities, and circuit primitives this record states.

doi.org/10.1017/cbo9780511976667