I saw a 5-qubit GHZ state on Twitter and wondered what the upper limit of quantum entanglement is. So, I built a quick 14-qubit GHZ state just to see what would happen.

The circuit sure is pretty. I’m not sure that’s a technical term, but I’m going to use it anyway.

For those who are not sure what they are looking at, the very top left features a Hadamard gate (the block with the letter H) on qubit0. That puts qubit0 into a superposition state, which means that a measurement has a 50/50 chance of showing 0 and a 50/50 chance of showing 1. Disclaimer: that is a grossly oversimplified definition of superposition, but it is enough to describe this experiment.

The next 13 light blue lines are Controlled-NOT gates, causing entangled states between qubit0 and each of the other 13 qubits. Grossly oversimplified again, entanglement means that if qubit0 is measured as 0, its entangled partner should also be measured as 0. If qubit0 is measured as 1, its partner should also be measured as 1.

A GHZ state is the quantum entanglement of more than two partners. The choice of 5-qubits was probably made due to the availability of 5-qubit quantum computers. But, I have access to 14 qubits through IBM Q Experience, so why not try using all of them?

Finally, the right side of the circuit is all the masurements. Each qubit is measured individually.

On a simulator, the result is just about perfect. If qubit0 is measured as 0, so are all 13 other qubits. If qubit0 is measured as 1, so are all 13 other qubits. The split is not perfectly 50/50, but even that is pretty darn close.

On real hardware, the resultant histogram has — putting it mildly — issues. We can blame imprecise measurements and environmental factors (vibration, temperature fluctuation, electromagnetism).

For comparison, this is a 3-qubit GHZ state, the smallest GHZ state. As you can see, on the exact same hardware, the experiment works. The 3 qubits, for the most part, measure all zeroes or all ones, as they should. The error rate is about 6%, which is surprisingly low. Remember: quantum computing is still very much in its infancy.

Therefore, the experiment breaks down somewhere between 3 and 14 qubits. I didn’t test every configuration, although that would be an interesting follow-up experiment. Instead of asking how many qubits can simultaneously be in a GHZ state, it is better to ask how many qubits can be in a GHZ state before entanglement no longer appears evident.