# W state **W state** is an entangled three-qubit state that is an equal superposition over all configurations with exactly one qubit in state $\lvert 1\rangle$ and the others in $\lvert 0\rangle$. $$\lvert W\rangle = \frac{1}{\sqrt{3}}(\lvert 001\rangle + \lvert 010\rangle + \lvert 100\rangle)$$ The W state was identified by Wolfgang Dür, Guifré Vidal, and J. Ignacio Cirac in 2000 as part of their classification of three-qubit entanglement. Unlike the [[ket-ghz|GHZ state]], the W state is robust against the loss of one qubit: if any single qubit is traced out, the remaining two qubits are still entangled. This robustness makes W states attractive for quantum networking and distributed quantum computing. ## Generalization The $n$-qubit W state generalizes to an equal superposition of all $n$-qubit bitstrings with exactly one $\lvert 1\rangle$. $$\lvert W_n\rangle = \frac{1}{\sqrt{n}}\sum_{k=0}^{n-1}\lvert \underbrace{0\cdots 0}_{k}\,1\,\underbrace{0\cdots 0}_{n-k-1}\rangle$$ ## Comparison with GHZ The W state and the GHZ state represent the two inequivalent classes of genuine three-qubit entanglement. They cannot be interconverted by local operations and classical communication (LOCC). The GHZ class exhibits stronger all-or-nothing correlations but is fully fragile under qubit loss. The W class has weaker but more resilient entanglement — tracing out one qubit leaves the remaining two in a partially entangled mixed state rather than a completely mixed state. ## Gates ### SWAP The W state is symmetric under any permutation of its three qubits, because all three terms have the same amplitude $1/\sqrt{3}$ and swapping two qubits just relabels which term is which. SWAP on any pair leaves the state unchanged. $$\text{SWAP}_{12}\lvert W\rangle = \frac{1}{\sqrt{3}}(\lvert 010\rangle + \lvert 001\rangle + \lvert 100\rangle) = \lvert W\rangle$$ ### $X^{\otimes 3}$ Flipping all three qubits simultaneously maps each basis vector: $\lvert 001\rangle \to \lvert 110\rangle$, $\lvert 010\rangle \to \lvert 101\rangle$, $\lvert 100\rangle \to \lvert 011\rangle$. The result is an equal superposition of all three-qubit strings with exactly two $\lvert 1\rangle$s — sometimes called the complementary W state. $$X^{\otimes 3}\lvert W\rangle = \frac{1}{\sqrt{3}}(\lvert 110\rangle + \lvert 101\rangle + \lvert 011\rangle)$$ ### Z on qubit 1 Applying Z only to qubit 1 multiplies the term where qubit 1 is $\lvert 1\rangle$ (which is $\lvert 100\rangle$) by $-1$, while leaving the other two terms unchanged. This breaks the permutation symmetry; the result is no longer a W state. $$Z_1\lvert W\rangle = \frac{1}{\sqrt{3}}(\lvert 001\rangle + \lvert 010\rangle - \lvert 100\rangle)$$ ## States ### $\lvert\text{GHZ}\rangle$ The W state and the GHZ state are the two inequivalent classes of genuine three-qubit entanglement. They cannot be interconverted by any sequence of local operations and classical communication (LOCC), which is a much stronger statement than just "they're different states". The GHZ state has all-or-nothing correlations and collapses completely under qubit loss; the W state has weaker but more resilient entanglement. ### $\lvert\Psi^+\rangle$ Measuring qubit 3 in the computational basis reveals the robustness of the W state. If the outcome is $\lvert 0\rangle$ (probability $2/3$), the remaining state is $\tfrac{1}{\sqrt{2}}(\lvert 01\rangle + \lvert 10\rangle) = \lvert\Psi^+\rangle$ — still a Bell state. If the outcome is $\lvert 1\rangle$ (probability $1/3$), the remaining state collapses to the product state $\lvert 00\rangle$. Either way, you know which qubit held the excitation, and two thirds of the time you still have entanglement. ### $\lvert W_n\rangle$ and $\lvert\Psi^+\rangle$ The $n$-qubit W state generalizes to all $n$-qubit bitstrings with exactly one $\lvert 1\rangle$. The $n=2$ special case is exactly $\lvert\Psi^+\rangle = \tfrac{1}{\sqrt{2}}(\lvert 01\rangle + \lvert 10\rangle)$, so the Bell state $\lvert\Psi^+\rangle$ is the two-qubit W state. ## List of code implementations - [[w-state-qiskit|Qiskit]]