Representation of Data

Qubits

A bit of data is represented by a single atom that is in one of two states denoted by $\ket0$ and $\ket1$. A single bit of this form is known as a qubit

在量子计算机中,一个原子可以通过 $\ket0$ 和 $\ket1$ 其中之一的状态来表示一个比特位的数据。一个形如这样的比特位被称为量子位

A physical implementation of a qubit could use the two energy levels of an atom. An excited state representing $\ket1$ and a ground state representing $\ket0$.

量子位的物理实现可以通过一个原子的两个能级来表示。激发态表示 $\ket1$ 而基态表示 $\ket0$ 。

qubitstate

Superposition

A single qubit can be forced into a superposition of the two states denoted by the addition of the state vectors:

我们用一组向量表示两个状态的叠加,从而可以强制通过量子叠加表示单个量子位。

$$\ket\psi=\alpha_1\ket0+\alpha_2\ket1$$

Where $\alpha_1$ and $\alpha_2$ are complex numbers and $|\alpha_1|^2+|\alpha_2|^2 = 1$

这里的 $\alpha_1$ 和 $\alpha_2$ 是复数,而且满足 $|\alpha_1|^2+|\alpha_2|^2 = 1$

A qubit in superposition is in both of the states $\ket1$ and $\ket0$ at the same time

一个量子叠加的量子位同时处于 $\ket1$ 和 $\ket0$ 的状态

superposition

Consider a 3 bit qubit register. An equally weighted superposition of all possible states would be denoted by:

考虑一个 3-bit 大小的寄存器,量子叠加所有状态的一个等价表示如下:

$$\ket\psi = 1/\sqrt8\ket{000}+1/\sqrt8\ket{001}+…+1/\sqrt8\ket{111}$$

Data Retrieval

In general, an n qubit register can represent the numbers $0$ through $2^n-1$ simultaneously.

总而言之,一个 n-bit 的寄存器的寄存器可以同时表示 $0$ 到 $2^n-1$ 。

Sound too good to be true?…It is!

听起来是不是过于美妙了?但是这就是事实。

If we attempt to retrieve the values represented within a superposition, the superposition randomly collapses to represent just one of the original values.

如果我们尝试去查看处于叠加状态的值,叠加状态会随机地坍缩,仅仅会表示原值中的一个。

In our equation: $\ket\psi=\alpha_1\ket0+\alpha_2\ket1$ , $\alpha_1$ represents the probability of the superposition collapsing to $\ket0$. The $\alpha_n$’s are called probability amplitudes. In a balanced superposition, $\alpha_n=1/\sqrt2$ where n is the number of qubits.

在我们的方程中:$\ket\psi=\alpha_1\ket0+\alpha_2\ket1$ ,$\alpha_1$ 表示坍缩到 $\ket0$ 的概率。$\alpha_n$ 被称为概率幅。在平衡叠加状态,满足 $\alpha_n=1/\sqrt2$ ,n 是量子位的数量。

Entanglement

Entanglement is the ability of quantum systems to exhibit correlations between states within a superposition.

纠缠是量子系统在叠加态之间展现相互关系的能力。

Imagine two qubits, each in the state $\ket0$ + $\ket1$ (a superposition of the 0 and 1.) We can entangle the two qubits such that the measurement of one qubit is always correlated to the measurement of the other qubit.

想象两个比特,每一个都在 0 和 1 的量子叠加状态,我们可以将两个量子位纠缠在一起,使得一个量子位的测量总是与另一个量子位的测量相关联。

Operations on Qubits

Reversible Logic

Due to the nature of quantum physics, the destruction of information in a gate will cause heat to be evolved which can destroy the superposition of qubits.

由于量子物理学的性质,门中信息的破坏将导致放出热量,从而破坏量子比特的叠加。

traditional-gate

This type of gate cannot be used. We must use Quantum Gates.

因此不能使用这种类型的门,我们必须使用量子门。

Quantum Gates

Quantum Gates are similar to classical gates, but do not have a degenerate output. i.e. their original input state can be derived from their output state, uniquely. They must be reversible.

量子门类似于经典门,但没有退化输出。 也就是说,它们的原始输入状态可以唯一地从它们的输出状态中导出。 它们必须是可逆的。

This means that a deterministic computation can be performed on a quantum computer only if it is reversible. Luckily, it has been shown that any deterministic computation can be made reversible.(Charles Bennet, 1973)

这意味着只有在可逆的情况下,才能在量子计算机上执行确定性计算。 幸运的是,已经证明任何确定性计算都可以实现可逆。(Charles Bennet,1973)

Hadamard

Simplest gate involves one qubit and is called a Hadamard Gate (also known as a square-root of NOT gate.) Used to put qubits into superposition.

最简单的门涉及一个量子位,称为 Hadamard 门(也称为 NOT 门的平方根),用于将量子位叠加。

hadamard

Note: Two Hadamard gates used in succession can be used as a NOT gate

注意:连续使用的两个 Hadamard 门可以作为一个非门

Controlled NOT

A gate which operates on two qubits is called a Controlled-NOT (CN) Gate. If the bit on the control line is 1, invert the bit on the target line.

在两个量子位上运行的门称为受控非 (CN) 门。 如果控制线上的位为 1,则将目标线上的位反转。

controlled-not

Note: The CN gate has a similar behavior to the XOR gate with some extra information to make it reversible.

注意:CN 门与 XOR 门具有相似的行为,但有一些额外的信息使其可逆。

Multiplication By 2

We can build a reversible logic circuit to calculate multiplication by 2 using CN gates arranged in the following manner:

我们可以构建一个可逆逻辑电路,使用按以下方式排列的 CN 门来计算 2 的乘法:

multiplication-by-2

Controlled Controlled NOT (CCN)

A gate which operates on three qubits is called a Controlled Controlled NOT (CCN) Gate. Iff the bits on both of the control lines is 1,then the target bit is inverted.

在三个量子位上运行的门称为受控受控非 (CCN) 门。 如果两条控制线上的位都是 1,则目标位被反转。

controlled-controlled-not

A Universal Quantum Computer

The CCN gate has been shown to be a universal reversible logic gate as it can be used as a NAND gate.

CCN 门已被证明是一种通用的可逆逻辑门,因为它可以用作与非门。

universal

When our target input is 1, our target output is a result of a NAND of B and C.

当我们的目标 A 输入为 1 时,我们的目标输出 A 是 B 和 C 的 NAND 的结果。

Reference

  • Joseph Stelmach, Quantum Computer

https://www.eecis.udel.edu/~saunders/courses/879-03s/quantumComputers.ppt

  • wikipedia, probability amplitudes

https://en.wikipedia.org/wiki/Probability_amplitude

  • wikipedia, Quantum superposition

https://en.wikipedia.org/wiki/Quantum_superposition

PS

感谢 https://note.qidong.name/2018/03/hugo-mathjax/ 这篇博客,我终于找到了在 hugo 中使用公式的完美方案。