Nature isn't classical, dammit, and if you want to make a simulation of nature, you'd better make it quantum mechanical.
a device capable of performing computation using the principles of quantum information theory
subatomic modeling, molecular simulations, drug discovery
problem optimization, energy research, simulation and discovery
secure communication, cryptoanalysis
quantum classifiers, hybrid quantum/classical training
risk analysis, complex simulations, portfolio optimization
// queue job
az quantum job submit --target-id {target}
// check job status
az quantum job show --job-id {id}
// fetch job output
az quantum job output --job-id {id}
Result Frequency
--------- ----------- ----------------------
[0,1,0,0] 0.60000000 |████████████ |
[0,0,1,0] 0.20000000 |████ |
[1,0,1,0] 0.20000000 |████ |
In classical computing a bit can have only two discrete values
In quantum information theory an information unit is called a qubit.
The qubit is described by a two dimensional state vector, where $\alpha$ and $\beta$ are complex numbers.
$$|\alpha|^2 + |\beta|^2 = 1$$
To describe the state of a multi-qubit system, we use a tensor product of the individual states.
$$ \begin{bmatrix}\alpha_1 \\ \beta_1 \end{bmatrix} \otimes \begin{bmatrix}\alpha_2 \\ \beta_2 \end{bmatrix} = \begin{bmatrix}\alpha_1\alpha_2 \\ \alpha_1\beta_2 \\ \beta_1\alpha_2 \\ \beta_1\beta_2 \end{bmatrix} $$
A quantum state vector for $n$ qubits has
which makes quantum simulations on classical devices almost impossible
To simulate a molecule of penicillin we need
which exceeds the amount of atoms in the universe
The same simulation can in principle be done on a
error-free quantum computer.
Similarly to a bit, a qubit has two distinguishable states.
$$ \begin{bmatrix} 1 \cr 0 \end{bmatrix} = \ket{0} = 0 \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; \begin{bmatrix} 0 \cr 1 \end{bmatrix} = \ket{1} = 1 $$
Together, we call them the $\mathbf{Z}$ basis
Qubit state can be visualized using a Bloch sphere, where $\ket{0}$ and $\ket{1}$ are vectors starting at the center and pointing to "north pole" and "south pole".
All other states are a linear combination of $\ket{0}$ and $\ket{1}$. This is a superposition.
A superposition state is
Only the basis states can be observed in the measurement process
Upon observation, superposition state collapses to one of the observable states (e.g. $\ket{0}$ or $\ket{1}$).
$$P(0) = P(\ket{0}) = |\alpha|^2$$ $$P(1) = P(\ket{1}) = |\beta|^2$$
$$|\alpha|^2 + |\beta|^2 = 1$$
type | input | execution | output | |||
---|---|---|---|---|---|---|
Classical | 010 | $\rightarrow$ | 110 | $\rightarrow$ | 001 | |
Quantum | $\ket{1}\ket{0}\ket{0}$ | $\rightarrow$ | $\ket{\psi}$ | $\rightarrow$ | $\ket{0}\ket{1}\ket{0}$ |
I am convinced that God does not play dice
$$ \mathbf{H}=\frac{1}{\sqrt{2}}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}$$
$$\mathbf{H}\ket{0} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\begin{bmatrix} 1 \\ 0 \end{bmatrix} = \frac{1}{\sqrt{2}}\ket{0} + \frac{1}{\sqrt{2}}\ket{1}$$
$$\mathbf{H}\ket{1} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\begin{bmatrix} 0 \\ 1 \end{bmatrix} = \frac{1}{\sqrt{2}}\ket{0} - \frac{1}{\sqrt{2}}\ket{1}$$
Upon measurement, there is an equal 50% probability of a collapse to $\ket{0}$ or a $\ket{1}$.
$$\mathbf{H} \times \mathbf{H} = \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \end{bmatrix} \times \begin{bmatrix} \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}} \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = I $$
Applying $H$ a second time, without a measurement, will return the qubit to its earlier state due to interference. This results in the randomness disappearing again.
The strength of quantum computers is that they are able to take algorithmic advantage of superposition. This is called
...quantum parallelism allows quantum computers to evaluate a function $f(x)$ for many different values of x simultaneously.
Deutsch's problem - given an unknown function
determine if the function is constant or balanced
Classically, two function evaluations are needed.
After the first execution, we still cannot say if the function is balanced or constant.
On a quantum computer, thanks to interference, the answer can be obtained in just one call.
The linear algebra for the circuit produces (for the measured qubit)
$$\ket{\psi} = \begin{cases} \; \ket{0} \;\;\;\; \text{when f(0) = f(1)} \\ \; \ket{1} \;\;\;\; \text{when f(0)} \neq \text{f(1)} \\ \end{cases} $$
This solves the problem in a single shot.
Applies the NOT logic on one qubit, based on the state of another qubit. It can create entanglement.
$$ \mathbf{CNOT}=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{bmatrix}$$
$\mathbf{CNOT}$ flips the target qubit if the control qubit is in state $\ket{1}$
$$\mathbf{CNOT}(\ket{0}\ket{0}) = \ket{0}\ket{0}$$
$$\mathbf{CNOT}(\ket{0}\ket{1}) = \ket{0}\ket{1}$$
$$\mathbf{CNOT}(\ket{1}\ket{0}) = \ket{1}\ket{1}$$
$$\mathbf{CNOT}(\ket{1}\ket{1}) = \ket{1}\ket{0}$$
But what if the control qubit was in a
Then we have an entangled state.
$$\mathbf{CNOT} \biggl(\mathbf{H}\ket{0}\ket{0}\biggr) = \frac{1}{\sqrt{2}}\ket{0}\ket{0} + \frac{1}{\sqrt{2}}\ket{1}\ket{1}$$
Upon measurement of either qubit, there is an equal 50% probability of a state collapse to $\ket{00}$ or $\ket{11}$.
Entangled states
into a tensor product of the individual quantum states.
A single quantum state can span multiple quantum objects which are
Spooky action at a distance
We call this
It is based on the Bell's theorem from 1964.
Exploring entanglement in algorithms is a critical factor contributing to computational advantage of quantum computing.