I am very novice with quantum computing and try to understand it. I thought I was getting a handle on it until I built the quantum circuit (1) below. The app I used to build it allows me to measure the possible outcomes. It was no surprise for me that whenever the fifth qbit resulted in a zero, that there would be an even number of qbits following it. However, when it resulted in a one I was surprised to see there were only two possible outcomes, each with approximately 25% chance of occurring. The states are [10000> and [11111> (note that the first qbit is put in the rightmost position and the fifth in the leftmost). What I was expecting was to see that one followed by all possible 4-qbit states, so: [10000>, [10001>, [10010>, [10011>, ..., [11110>, [11111>. Am I wrong or the app I used?
The way I understand it is as follows:
- First I put it in a uniform superposition where all 16 4-qubit states are equally possible using independent Hadamard gates.
- Then I check the parity of each state in the superposition using CNOT gates. So if a state has an odd number of ones, then the fifth bit will be flipped an odd number of times resulting in a one.
- Perform a Hadamard operation on each of the first qbit if the fifth qbit is a one. I expected this to turn [10001> into [10000> and [10001>, [10010> into [10010> and [10011>, ..., and [11110> into [11110> and [11111>. (So far measurements seem to confirm this expectation)
- Do the same for the second qbit. Now I see dependencies between those first and second qbits appear that I did not expect. I would for example expect [10000> and [10001> to become [10000>, [10010>, [10001>, and [10011>, but instead it seems those two states transform into just [10000> and [10011>.
- Do the same for the third and fourth qbits.
What's actually happening here at step 4? What am I missing?