Category: fundamentals | Difficulty: intermediate | Qubits: 3 | Gates: 10 | Depth: 6
The W state is the second inequivalent class of genuine tripartite entanglement (the other being GHZ). Unlike GHZ, if one qubit is lost, the remaining two-qubit state is still entangled. The W state is robust to particle loss and has applications in quantum communication and quantum networks.
33.3% |001⟩, 33.3% |010⟩, 33.3% |100⟩
The OpenQASM 2.0 circuit is in circuit.qasm.
OPENQASM 2.0;
include "qelib1.inc";
// W state: (|001> + |010> + |100>) / sqrt(3)
// q[0]=MSB, q[1]=mid, q[2]=LSB
qreg q[3];
creg c[3];
// Step 1: Ry gives amplitude 1/sqrt(3) on |1> and sqrt(2/3) on |0> for q[0]
ry(1.2309594173407747) q[0];
// Step 2: anti-controlled Hadamard on q[1] (when q[0]=0 distribute to q[1])
x q[0];
ch q[0],q[1];
x q[0];
// Step 3: when q[0]=q[1]=0 set q[2]=1 (anti-controlled CCNOT)
x q[0];
x q[1];
ccx q[0],q[1],q[2];
x q[0];
x q[1];
measure q[0] -> c[0];
measure q[1] -> c[1];
measure q[2] -> c[2];
entanglement fundamentals w-state multipartite robust
MIT — part of the OpenQC Algorithm Catalog.