3 ms·
To elaborate on why CZ / CNOT are so important: CNOT is controlled-NOT (CZ is controlled-Z, but NOT has a clearer classical analogue, and phases are harder to
by vitus 2y ago
To elaborate on why CZ / CNOT are so important:
CNOT is controlled-NOT (CZ is controlled-Z, but NOT has a clearer classical analogue, and phases are harder to explain).
Consider two inputs A and B, where A is a mixture of the zero-state (|0>; ground) and the one-state (|1>; excited) a|0> + b|1> (such that |a|^2 + |b|^2 = 1), and B is the pure zero-state |0>.
In this case, A behaves somewhat like a selector: when it is |1>, B's state will be flipped from |0> to |1> (and vice versa), and when it is |0>, B's state will remain the same. But crucially, this applies for the entire superposition of states! So the portion of the wavefunction where A is in the zero-state will do nothing, but the portion where A is in the one-state, it'll flip B from its zero-state.
In other words, CNOT takes the state from a|00> + b|10> to a|00> + b|11>, i.e. it entangles a qubit that was previously in the ground state with an arbitrary other qubit. Now if you measure A, then B (or the other way around), you'll always get the same result for both (provided that the quantum state is still coherent).
(Normally, if you took two particles that had the same state but were not correlated, you'd have to consider all the possibilities of being in |00>, |01>, |10>, and |11>.)
- MobiusHorizons 2y agoThis was very helpful, but I just can’t decipher this central paragraph > Consider two inputs A and B, where A is a mixture of the zero-state (|0>; ground) and the one-state (|1>; excited) a|0> + b|1> (such that |a|^2 + |b|^2 = 1), and B is the pure zero-state |0>. I’m guessing the notation is tripping me up, but I’m having trouble parsing this. A: mix of |0> and |1> B: apparently |0>, but elsewhere you refer to it being unconstrained. CNOT(A,B) = a|0> + b|1> (such that |a|^2 + |b|^2 = 1)??? The relationship between the parenthetical and the a + b bit is impenetrable, but I can’t fathom what absolute value or squaring would do in the context of single qubits.
- itishappy 2y agoIn the statement |a> + |b>, both a and b are probability amplitudes (complex numbers). You obtain the probability density by squaring the probability amplitude (or rather, multiplying it by it's complex conjugate aa*), which gives the same result as squaring the magnitude, so it can be written |a|^2. Since there's two possible states in our system, their probabilities have to add to unity, so |a|^2 + |b|^2 = 1. https://en.wikipedia.org/wiki/Probability_amplitude https://en.wikipedia.org/wiki/Probability_amplitude
- vlmutolo 2y agoThis is quantum mechanics notation and basic principles. |x> is pronounced “ket x” (the second half of the intentionally-misspelled word braket), and refers to a quantum state x. The quantum states |0> and |1> refer to the classical states we’re used to. But as written in the GP comment, a general qubit state is given by a|0> + b|1>, where a and b are complex numbers. This is a “superposition”: the qubit occupies both states simultaneously and will resolve to one of them when observed/measured. For any quantum state written in this way, we know from quantum mechanics that observing the state will yield a measurement of the state |0> with probability |a|^2 (the norm of the complex number a), and will yield state |1> with probability |b|^2. The qubit measurement must yield exactly one of a or b, so the probabilities must add up to 1, hence |a|^2 + |b|^2 = 1.
- MobiusHorizons 2y agoVery helpful, thank you
- vitus 2y ago> B: apparently |0>, but elsewhere you refer to it being unconstrained. This is probably due to my wording not really being a parallel construction. The unconstrained qubit was A; in my example, B is the qubit that's in the ground state. Sorry for the confusion! A sibling commenter elaborated on my parenthetical, which is really just a constraint on what values can be used for the probability amplitudes a and b. (I kind of hate the term "probability amplitude", but that's the standard nomenclature.) There are two main observations from a and b being complex numbers: 1. You can turn these amplitudes into classical probabilities for getting a particular outcome out of measuring A by squaring their magnitudes. So if you had a = 3/5 and b = -4/5 i, then you'd have (3/5)^2 = 36% chance of observing |0> and |-4/5 i|^2 = 64% chance of observing |1>. 2. What's perhaps the most important bit about quantum computing is the relative phase between these eigenstates, and the ability to achieve just the right interference pattern such that everything cancels out except for certain peaks that can give you something interesting. This is what differentiates QM from classical probability theory, and why we can't just take the existing quantum algorithms and reimplement them in classical computers.