HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Quantum computing 'amplitudes'

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
amplitudescomputingquantum

Problem

As far as I understand, you receive an output from a quantum computer for an algorithm in the form of an amplitude, which is one of the many states your qubits may be in, however this amplitude is a complex number.

I understand that you have to square the amplitude to find the probability of finding that amplitude, but how do you convert that original amplitude into something relevant to the problem (i.e. that 3*5=15)? Is there coding within the algorithm to change the amplitude into a malleable answer?

Solution

The state of a qubit, or of a collection of qubits, is given by a state vector. However, most people would say that the output of a quantum computer is in fact the result of a measurement, which transforms the state into one which indicates a single outcome.

There are many ways to approach this, but the simplest one to describe mathematically is complete measurement in the standard basis. In this case, you transform a quantum state on $n$ qubits into an $n$-bit string.

Suppose that you have a state $|\psi\rangle \in \mathbb C^{2^n}$ on $n$ qubits, given by $$ |\psi\rangle \;=\; \sum_{x \in \{0,1\}^n} \!u_x \;|x_1 x_2 \cdots x_n \rangle \;, \quad \text{such that } \sum\limits_{x\in\{0,1\}^n} \!|u_x|^2 = 1 .$$

In order to get a classical output from a quantum computer, one thing you can do is to perform a complete measurement in the standard basis. What this means is that we collapse the state to some single output vector $y \in \{0,1\}^n$. We get different bit-strings $y$ with different probabilities, governed by the formula
$$
\Pr\nolimits_\psi(y) \;=\; \Bigl| \langle y | \psi \rangle \Bigr|^2
\;=\; \left| \sum_{x \in \{0,1\}^n} \!u_x \; \langle y_1 y_2 \cdots y_n | x_1 x_2 \cdots x_n \rangle \right|^2
\;=\; \left| u_y \right|^2 \;.
$$
The outcome is then just a random output string $y \in \{0,1\}^n$, where the probabilities are given by the non-negative real numbers $|u_y|^2$. Afterwards, you can compute with the measurement result $y \in \{0,1\}^n$ however you like, with a classical computer.

It's possible to describe performing a measurement only on a single bit, or with respect to bases other than the standard basis, but that's not really necessary to answer your question; measuring all of the qubits is certainly something you can do, and it's enough to get classical outputs from quantum computations.

Context

StackExchange Computer Science Q#6408, answer score: 3

Revisions (0)

No revisions yet.