這篇先來介紹量子運算的基礎-位元運算吧!位元的運算不管是對於傳統電腦或量子電腦皆是不可或缺的基礎,而量子電腦則拓展到了特殊化的標記與邏輯閘的運算。

Foundamental Notation of Quantum Computing

Definition of Quantum Computing

量子位元(以下簡稱 Qubit)運用狄拉克標記(Dirac notation)來描述一個量子$\phi$的狀態,並以單位位元$|0〉$與$|1〉$的線性組合來定義之。

$|\phi〉=\alpha|0〉+\beta|1〉;\alpha,\beta∈C$

而透過量子力學可以得知,$\phi$ 係數平方和 $\alpha^2+\beta^2=1$,且$\alpha^2$與$\beta^2$分別代表了$|0〉$與$|1〉$出現的機率。

Quantum Gates

首先介紹關於單一量子位元的操作邏輯閘(Logic Gates)。

Pauli-X Gate


Bit-Flip.其定義為翻轉(flip)量子位元,顧名思義,它進行以下運算:

$|0〉→|1〉$
$|1〉→|0〉$

Pauli-Z Gate


Phase Gate.此邏輯閘定義為保留$|0〉$的狀態不變,且將$|1〉$換成$-|1〉$

$|0〉→|0〉$
$|1〉→-|1〉$

Hadamard Gate


Create a 50-50 superstition from $|0〉$ and $|1〉$。建立出出現$|0〉$$|1〉$機率各 50%的量子位元

$|0〉→\dfrac{|0〉+|1〉}{\sqrt{2}}$
$|1〉→\dfrac{|0〉-|1〉}{\sqrt{2}}$

※ 量子閘具有線性運算特性,遵守運算基本性質(分配律與結合律)。

Supplement : TWICE HADAMARD

$For$ $|0⟩$:

$H(\dfrac{|0⟩+|1⟩}{\sqrt2})=\dfrac{H(|0⟩)+H(|1⟩)}{\sqrt2}$

$=\dfrac{1}{\sqrt2}(\dfrac{|0⟩+|1⟩}{\sqrt2}+\dfrac{|0⟩-|1⟩}{\sqrt2})$

$=|0⟩$

$For$ $|1⟩$:

$H(\dfrac{|0⟩-|1⟩}{\sqrt2})=\dfrac{H(|0⟩)-H(|1⟩)}{\sqrt2}$

$=\dfrac{1}{\sqrt2}[\dfrac{|0⟩+|1⟩}{\sqrt2}-(\dfrac{|0⟩-|1⟩}{\sqrt2})]$

$=|1⟩$

接著介紹多個量子位元的表示法與運算閘。

Multiple Qubit Notation

$|0〉→$ qibit A is $|0〉$
$|00〉→$ qibit A is $|0〉$ and qubit B is $|0〉$
$|000〉→$ qibit A is $|0〉$ and qubit B is $|0〉$ and qubit C is $|0〉$
…etc

CNOT Gate


Controlled Not.以控制位元決定是否要翻轉目標位元。

Control Qubit Target Qubit Flip or NOT
0 False
1 True

Exercise : Quantum Entanglement

Question: How to create an entagled state quantum bit?

Now we have two qubits: Qubit A and Qubit B.
Our target is to make these two qubits influence each other.
So, we have to make sure that one of the qubit’s value will be fixed after the other one is defined.$→$ Use CNOT Gate
And we also need to set the first qubit into two-valued state.$→$ Use Hadamard Gate

We create an entangled state quantum bit successfully!