Photo by Nick Nice on Unsplash
This post is going to be the first in a series where we will explore together the world of quantum entanglement. In this first article, we will aim at dusting out our understanding of a very common set of entangling gates: The controlled gates.
Once we are ready and in shape we will venture into the depths of topics like Phase Kickback, Computational Branches, Grover’s Algorithm, and other subjects where entanglement plays an interesting role.
The Classical Curse of the Controlled-X Operation
Beginners in quantum computing learn about the CX gate right after studying other 1-qubit gates like the Hadamard. A reason for this being the first 2-qubit gate they encounter is that it’s simple to explain in classical terms.
If the control qubit is in the ∣1〉 state, then apply an X gate to the second qubit. This is the usual explanation and it also does not take too much effort to understand how this works when your control qubit is in superposition. Write down your wave function and apply the classical definition above to each of its terms.
1⁄√2∣01〉 + 1⁄√2∣10〉 −> 1⁄√2∣11〉 + 1⁄√2∣10〉
The Controlled-Z and the Wave Function Mismatch
When we get to the CZ gate things get a bit more complicated. The effects of the Z gate are easier to see when applied to a qubit in superposition. It adds a relative phase to the ∣1〉 component of the state. The notion of applying the Z gate to the target qubit when the control qubit is in the 1 state is a bit trickier to interiorize.
We usually write wave functions as a linear combination of states in the Z basis. This makes it not always straightforward to see in what state a qubit is and so applying the same trick as with the CX gate is not always easy. A simple way to work around this is to give the CZ gate a standalone definition: Add a relative phase to the ∣11〉 component of your wave function.
1⁄√2∣00〉 + 1⁄√2∣11〉 −> 1⁄√2∣00〉 – 1⁄√2∣11〉
Correlations to the Rescue!
One of the reasons we use wave functions or density matrices to describe multi-qubit quantum states is that we cannot capture all the nuance that comes with entanglement by simply keeping track of each individual qubit state. In fact, once entangled, we really do not know in what state each qubit is.
There are some representations of quantum states which are less known to beginners. Some of these representations, nevertheless, make it easier to classically understand controlled operations in general. These representations keep track of qubits and their correlations or entanglement. While these representations have the advantage of showing correlations more prominently, they do so by giving up on the comfort of being able to see the possible measurement outcomes.
Examples of such representations are Graph States, Tensor Networks, Hypergraph States, and a more generic but experimental concept called EH (Entanglement Hypergraph) which I’m currently working on.
In the next posts, we will explore these representations a bit more in-depth and see what can we learn from them. In the meantime, If you want to learn more about how EHS helps you understand the correlations and effects of controlled operations here is the development video log of the project.