1

To my current, and very limited knowledge.

The CNOT gate is a function that should map 4 possible combinations of input, into 4 possible states

It happens, we theoretically expect 4 states in output with 25% chance.

In reality we measure roughly 2 states in output because of "entanglement" with 50%.

How do we know the gate is working properly, and is not effectively collapsed into a different gate that just maps 4 states into 2 states?

My question is: how we ruled out that possibility? (I'm not questioning it, rather I'm asking for "what I think is the missing Logic piece in my limited knowledge", so I can do a step further)

Thanks

2 Answers2

1

You aren't missing anything, and this does happen. This is the precise point of quantum error correction (QEC), and more particularly fault tolerance and the threshold theorem.

Briefly, we can encode the qubits with an error correcting code, blowing up the two qubits used in the gate to a larger number of physical qubits, and then we continuously correct them. This is good for quantum "memory" where the qubits aren't part of any algorithm, but you asked in particular about the CNOT gate. Thus, we need to implement the CNOT gate in a fault-tolerant manner, because there could (there will) be errors in the activation of the gates.

The good news about the CNOT gate is that the correction can be implemented transversally - meaning that each pair of logical qubits in a code block can be acted upon with a CNOT gate itself. But, other gates such as the CCNOT gate (the Toffoli gate) need a more involved error correction implementation.

The other very good news is that John Watrous just recently, and quite nicely, explained the concept of quantum fault tolerance and the threshold theorem over on the Qiskit channel.


The gates used to correct the errors themselves may introduce more errors - but as long as the error rate is below a threshold, the error correction should win in the long run. One analogy that I think I had heard somewhere was it would be as if the Wright brothers were told that they might have gotten the Flyer to fly a little bit in Kitty Hawk, but they could never go more than a couple miles, because they needed to add more fuel to the plane to go a longer distance, which increased the weight of the plane, which reduced the length that their plane could go. But because the efficiency of airplanes in converting fuel to distance travelled is below a threshold, adding more fuel in the long-run wins out.

Mark Spinelli
  • 15,789
  • 3
  • 26
  • 85
1

For the controlled-not gate, the gate maps input states to output states. Depending on what input you give it, you expect differing outputs. So, yes, there are input states which incorporate all 4 basis states and give a linear combination of all 4 basis states as output. For example, the state $$ |00\rangle+|01\rangle+|10\rangle+|11\rangle $$ is mapped to itself. So if you input that state and perform standard measurements on the output, you'll get each answer with 25% probability.

There are also input states which only give you linear combinations of two basis states on output. However, if should be noted that controlled-not preserves the number of basis states involved; it is just a permutation. So to get a linear combination of two states coming out, I need to put in a linear combination of two states. This might not be entangling. For example, $|0\rangle(|0\rangle+|1\rangle)$ does not change. It starts separable and stays separable. Whereas the state $(|0\rangle+|1\rangle)|0\rangle$ becomes $|00\rangle+|11\rangle$, an entangled state. (In both of these cases, you get two different outputs with 50% probability each.)

So, how do we know that a given controlled-not gate is behaving as we think it should be? You need to do some tests in it first. The obvious tests are to start with each of the 4 basis states $|00\rangle, |01\rangle, |10\rangle$ and $|11\rangle$ and see what outputs they give you. Do they match what you're expecting?

Then you want to test the gate in a different basis as well. This might just involve throwing some Hadamards into the initial states. Particularly if you're interested in the entangling properties of the gate, you might check those directly. For instance, if you supply the state $(|0\rangle+|1\rangle)|0\rangle$, we've already said that it should produce an entangled state. So, run something like a CHSH test on it to verify that it's behaving in a genuinely non-classical way (and quantify how much).

DaftWullie
  • 63,351
  • 4
  • 57
  • 142