Three-Qubit W-States on a Quantum Computer

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

The W-state


is one of the two nonequivalent entangled 3-qubit states, the other being the GHZ state


W-states (evidently named after Wolfgang Dür) are considered to have more robust entanglement than GHZ-states (named after Greenberger, Horne and Zeilinger). Two qubits of a W-state remain entangled even if one qubit is lost (or measured), while a GHZ state collapses.

The W-state can be created by the quantum computer circuit shown in the graphic. Click "show intermediate states" to see the quantum states of the 3-qubit system at each stage. More information is given in Details. Alice, Bob and Charlie each receive one of the three entangled qubits in the W-state. They are located far apart, at spacelike separations from one another, so that no individual action by any of the three can be causally connected to either of the other two.

We describe some experiments showing accord with Bell's theorem, according to which no classical theory of local hidden variables can reproduce the predictions of quantum mechanics. Suppose Alice, Bob and Charlie are provided with devices that can measure either or on their qubit. (These might, for example, be Stern–Gerlach analyzers.) A measurement will result in one of the base states or , while a measurement will give one of the alternative base states or . The two bases are related by

, .

In experiment 1, all three observers measure . The result will be one and two s. Thus any two measurements unambiguously determine the result of the third. In experiment 2, Alice again measures , while Bob and Charlie now measure . Assume that Alice finds . The W-state after Alice's measurement reduces to . Re-expressing the last two qubits in the basis, this transforms to . This implies that Bob and Charlie will obtain either two s or two s. In the case that Alice finds , no relevant information ensues: Bob and Charlie obtain random combinations of s and s.

A new experiment can be run by choosing a different seed.


Contributed by: S. M. Blinder (August 2022)
Open content licensed under CC BY-NC-SA



A quantum circuit that generates a 3-qubit W-state uses an -rotation gate, a controlled Hadamard gate, two CNOT gates and an X gate. The angle of rotation . The rotation matrix is given by




which sets up the sequence of transformations leading to the W-state.


[1] Wikipedia. "W State." (Jun 15, 2022)

[2] W. Dür, G. Vidal and J. I. Cirac, "Three Qubits Can Be Entangled in Two Inequivalent Ways," Physical Review A, 62(6), 2000 062314. doi:10.1103/PhysRevA.62.062314.

[3] A. Cabello, "Bell’s Theorem with and without Inequalities for the Three-Qubit Greenberger–Horne–Zeilinger and W States," Physical Review A 65(3), 2002 32108. doi:10.1103/PhysRevA.65.032108.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.