5

When I design some classical register, flip-flop, binary counter, small byte of RAM, etc from scratch with classical logic gate, I never deal with such binary direction because classical bit doesn't have direction.

I only care about whether its state currently in 0 or 1. Yes in classical gate, the magnitude amplitude is always deterministic (magnitude=1 or magnitude=0).

I accept the notion of this magnitude because it's useful for superposition state therefore it's useful for parallel computation. But why we need to know its phase angle too? What is the simple example of phase application? When I was designing full-adder that was discovered by Feynman as a simple example with just using Toffoli (CCNOT) and CNOT, I still don't have business with direction (phase angle).

So why should we care about phase angle (direction) in qubit state?

Update:

As far as I understand from average answers, the most simple example of phase application is for distinguish superposition state from previous state.

For example: To make a superposition state from a qubit, we put Hadamard gate H.

If the previous state was |0>, then it became superposition state |+>.

If the previous state was |1>, then it became superposition state too, but with rotating phase (π). Hence the superposition state is |->.

So if we put the Hadamard gate again, If the superposition state is |+>, then it will became |0> again. If the superposition state is |->, then it will became |1> again.

I'm as a computer engineer (not computer scientist), from explanation above I think in another word the phase is useful for storing previous state (memory) in case of Hadamard gate.

What I mean with storing is, |+> and |-> are both superposition state with carrying information about its previous state (we can think it act as memory). |+> the previous state was |0>, while |-> the previous state was |1>.

So when someone say hey, it's in superposition state., If we care about its previous state, we wouldn't know unless that someone write it mathematically with|+> or |->. Or tells explicitly like hey, it's in superposition state with phase angle π. then we know that the previous state was |1>.

But Hadamard gate is playing with rotating phase to the π. How about rotating phase to the π/2?. What case can I do for rotating phase to the π/2.

4 Answers4

16

The phase component is what makes quantum computing different from classical probabilistic computing. If your quantum computer was not able to implement a phase on your qubit, you could perform everything as efficiently on a classical computer. When you allow for phases, you can cause interference (where for example you can "nullify" wrong answer and "boost" correct answers) which can lead to more efficient algorithms (although this isn't always so obvious!).

  1. For a simple example of how phases can lead to interference, I would recommend this small discussion: https://quantumcomputing.stackexchange.com/a/27693/14597.
  2. For a simple example showcasing how quantum algorithms can use interference to be more efficient than a classical computer, I would recommend looking at the wikipedia page on the Deutsch-Jozsa algorithm: https://en.wikipedia.org/wiki/Deutsch%E2%80%93Jozsa_algorithm.
  3. For a less contrived but more complicated example, I will shamelessly plug my blog post on Shor's algorithm :) https://rajkk1.medium.com/finding-the-prime-factors-of-a-large-number-efficiently-with-the-help-of-shors-algorithm-e731f0aadff5.
sheesymcdeezy
  • 2,021
  • 8
  • 27
4

The phase of a qubit state matters partially defines superposition states. For a simple example, the Hadamard gate is a basic logic gate that maps $|0\rangle \leftrightarrow |+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)$ and $|1\rangle \leftrightarrow |-\rangle = \frac{1}{\sqrt{2}}(|0\rangle - |1\rangle)$. In words, the Hadamard gate maps computational basis states to superposition states with different phases, and vice versa.

For a more powerful case, there's also the Quantum Fourier Transform which is the key step in Shor's algorithm, among others. It works by generating different phases on different basis states such that the resulting state's superposition cancels out the "wrong" answers' probability amplitudes while amplifying those for the "correct" answers. I realize this a little bit of a hand-wavey explanation, but hopefully it helps.

Chris E
  • 1,498
  • 3
  • 10
2

At a very practical level, the phase tells you about the outcome probabilities in some other measurement basis.

For example, $|0\rangle+|1\rangle$ and $|0\rangle-|1\rangle$ might appear identical when measured in the computational basis, but measure in the $X$ basis (or equivalently, perform an $H$ rotation and then measure in the computational basis) and you'll find they give completely different results.

See also e.g. What is the difference between superpositions and mixed states?.

glS
  • 27,510
  • 7
  • 37
  • 125
2

Let

$$ |\pm\rangle = \frac{1}{\sqrt{2}}(|0\rangle \pm |1\rangle) $$

If we don't distinguish phase then $|+\rangle$ and $|-\rangle$ would look like the same state.

Let

$$ H = \frac{1}{\sqrt{2}}\begin{pmatrix}1 & 1 \\ 1 & -1\end{pmatrix} $$

We can see that $H|+\rangle = |0\rangle$ and $H|-\rangle = |1\rangle$. We see that $|+\rangle$ and $|-\rangle$ result in different states when acted on by the same operation $H$. This therefore leads us to conclude that $|+\rangle$ and $|-\rangle$ are in fact different and can't be considered to be the same, despite having the same amplitudes for $|0\rangle$ and $|1\rangle$.

Jagerber48
  • 195
  • 7