The Missing Piece
Up until now, we have been simplifying the way we represent states as graphs for the sake of brevity. If we want to turn this into a full-blown tool we must work out a way to at least model everything that a well-validated model for quantum computing like wave functions already does.
In general, a wave function of an n-qubit system consists of 2ⁿ complex numbers that represent the coefficients attached to each element of the computational basis in which you are operating. But if we think about isolated qubit systems, all it takes to represent a qubit’s state is 2 of these complex numbers. One that represents the coefficient for the |0> state and one for the |1> state.
As long as we do not add entanglement to the mix we know that a system made up of n qubits can be expressed as the tensor product of each individual qubit’s state. This means that if there is no entanglement, our graphs as defined up until now are good to go. We do not need any extra information. When we have a wave function that represents an entangled system, though, our current model fails. Let’s take a look at our Bell State example:
The first challenge is to note that each qubit has 2 nodes so we need to decide on a convention on how to reconstruct a wave function. Do we multiply each node of a given qubit with all the nodes of the other qubit? In this case, we would obtain the following wave function:
|00> + |01> + |10> + |11>
This is not even correct because the coefficients squared do not add up to 1 but more importantly, we know that the wave function of that particular Bell State should contain just the 00 and 11 components. If we only multiply the nodes within each edge instead and then add them together we get a better answer:
|00> + |11>
The only thing that we are missing here is the right complex numbers associated with each element. One way to add them into the mix is if we assign the missing complex numbers as a property of our edges and we multiply them with the result of tensor-multiplying the qubits together within each edge.
If α and β are equal to 1∕√2 we can then recover the correct wave function.
α|00> + β|11>; α = β = 1∕√2
1∕√2|00> + 1∕√2|11>
Now our model seems to be a better and more generic fit. Let’s put it to the test!
Destroying the Bell State
One way to unentangle the bell state is to run the same gates but in reverse in order to uncompute the state. This means that we should apply a CX gate followed by a Hadamard in order to go back to the |00> state. In order to disentangle the qubits, though, the CX gate is the only one that we need to reverse because this was the gate that caused our system to et entangled.
Because we start off with a graph that represents possible states of q0 and q1 and how they are related to each other it seems intuitive enough that the effect of running a gate between the 2 qubits needs to take effect independently for all the existing edges. This means that the effect of the CX gate needs to be computed separately for each edge. But because it is a controlled operation it only has an effect on the 1 – 1 edge leaving us with the following graph:
We ended up with a bit of a special graph. Note that the only reason we originally had the idea of the edges was due to the fact that certain groups of nodes simply made no sense together. A qubit cannot be in 2 pure states at once (we’ll see how that related to mixed states in a later post).
All the nodes belonging to q1 are now in the state |0> and therefore having two separate edges makes no sense. The entanglement can be simplified to an extent where it does not exist anymore.
An intuitive evolution of the graph would probably look like this:
But it just does not make much sense because we gave the edges a specific interpretation in our previous post. Regardless of the state in which q0 is considered to be, q1 will always be in |0>. We might as well simplify how we represent this by just having one node for q0 as well.
We are not doing anything revolutionary here. If you pay close attention you’ll realize that we are just doing traditional factorization here but in a more visual way. This will com in handy once our system grows in terms of qubits because it will allow us to keep and evolve a representation of the full state that does not always grow exponentially as is the case with wave functions. It won’t come for free, though.
We’ll study the pros and cons of our new model in the next post.