|q⟩ Bad Qubits

advanced · Physics · Stabilizer Formalism & CSS Codes

Graph States

Graph states are a beautiful, intuitive family of stabilizer states. Each one is built from a simple graph: vertices become qubits and edges become entangling gates. They unify cluster states for measurement-based computing, many error-correcting codewords, and a whole visual calculus for entanglement.

Definition

Let G=(V,E)G = (V, E) be an undirected graph with one vertex per qubit. The graph state G|G\rangle is prepared by:

  1. Initializing every qubit in +=12(0+1)|+\rangle = \tfrac{1}{\sqrt2}(|0\rangle + |1\rangle).
  2. Applying a controlled-ZZ gate, CZ\mathrm{CZ}, across every edge (a,b)E(a,b) \in E.

In symbols,

G=((a,b)ECZab)+V.|G\rangle = \Bigg(\prod_{(a,b)\in E} \mathrm{CZ}_{ab}\Bigg)\, |+\rangle^{\otimes |V|}.

Because all CZ\mathrm{CZ} gates commute with one another, the order of applying them is irrelevant — only the edge set matters. Each CZ\mathrm{CZ} is Clifford and +|+\rangle is a stabilizer state, so every graph state is a stabilizer state.

The graph-state stabilizers

For each vertex vv, the graph state has a stabilizer generator

Kv=XvwN(v)Zw,K_v = X_v \prod_{w \in N(v)} Z_w,

where N(v)N(v) is the set of neighbors of vv. That is: an XX on the vertex itself, dressed by a ZZ on each adjacent qubit. The nn generators {Kv}\{K_v\} commute (you can check KuK_u and KvK_v overlap in an even number of anticommuting positions) and are independent, so they fully specify the unique nn-qubit graph state. This is the cleanest possible "state = graph" dictionary: read the neighbors off the picture and you have the stabilizers.

Examples

Why graph states matter

Try it

Build the linear graph state for the path 0120 - 1 - 2: Hadamard every qubit, then apply CZ\mathrm{CZ} on edges (0,1)(0,1) and (1,2)(1,2). The result is the three-qubit 1D cluster state.

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.