4 Basic of Quantum computer · 제4장 양자컴퓨터 기초
양자컴퓨터는 아날로그 컴퓨터의 장점과 디지털 컴퓨터의 장점을 모두 갖는다. 디지털 컴퓨터의 장점은 0과 1로 이루어진 디지털 데이터를 사용한다는 것이며, 이는 데이터의 입력과 출력을 편리하게 한다. 아날로그 컴퓨터는 아날로그 데이터를 사용하며, 연산의 효율이 높다는 장점을 갖는다.
예를 들어 $1.21212137+0.12121211$을 생각하자. $A$를 $1.21212137$, $B$를 $0.12121211$이라 하자. 먼저 아날로그 컴퓨터에서의 연산을 서술한다. 키르히호프 전류 법칙에 따르면 한 마디로 흘러 들어가는 전류는 흘러 나가는 전류와 같아야 한다. 그러므로 전류 $A$가 흐르는 도선 두 개와 전류 $B$가 흐르는 도선 하나가 한 점에서 만나 하나의 도선이 되면, 만난 뒤의 전류는 $A + B$이다. 다음으로 디지털 컴퓨터에서의 연산을 서술한다. 9자리 수를 비트로 나타내면 30자리가 된다. 비트의 덧셈 연산 하나하나에도 비용이 든다. 이 경우 아날로그 컴퓨터가 디지털 컴퓨터보다 효율적이다. 그러나 아날로그 컴퓨터의 단점은 데이터의 입력과 출력이 어렵고 연산에 이상적인 환경이 필요하다는 것이다.
디지털 컴퓨터의 장점은 입자와 같다는 것이고, 아날로그 컴퓨터의 장점은 파동과 같다는 것이다. 양자컴퓨터는 파동과 입자 양쪽의 장점을 모두 활용하기 위해 중첩과 붕괴를 이용한다. 더 구체적으로 말하면, 중첩 상태는 측정이라는 과정을 통해 붕괴한다.
Quantum computers have the advantages of analog computers and the advantages of digital computers. The advantage of digital computers is that they use digital data, which consists of 0 and 1. It makes it convenient to input and output data. The analog computers use analog data. It has the advantage of being efficiency of operations.
For example, consider 1.21212137+0.12121211. Let $A$ be the 1.21212137 and $B$ be the 0.12121211. First, describe an operation on an analog computer. Note that Kirchhoff’s current law states that the current flowing into a node must be equal to the current flowing out of it. So If two wires with current $A$ and one with current $B$ meet at a point as a single wire, then the current after they meet at the point is $A + B$. Second, describe an operation on an digital computer. A 9-digit number expressed in bits is 30 digits. Even bit additive operations require a cost. In this case, an analog computer is more efficient than a digital computer. However, the downside of analog computers is that data is difficult to input and output, and computation requires an ideal environment.
The advantage of digital computers is that they are like particles, and the advantage of analog computers is that they are like waves. Quantum computers use superposition and collapse to exploit the advantages of waves and particles. More explicitly, a superposition state is collapsed through a process called measurement.
4.1 one-qubit · 1-큐비트
비트는 0과 1로 이루어진, 고전컴퓨터에서 정보의 단위이다.
A bit is the unit information in classical computer consisting of 0 and 1.
큐비트는 다음의 단위벡터로 이루어진, 양자컴퓨터에서 정보의 단위이다.
A qubit is the unit information in quantum computer consisting of unit vector of
$(1, 0), (0, 1)$을 각각 $e_1, e_2$라 쓰자. 이는 $(x, y) = xe_1 + ye_2$임을 뜻한다.
큐비트 $(x, y)$를 측정하면 확률 $|x|^2$로 0을, 확률 $|y|^2$로 1을 측정한다. 즉 이는 고전컴퓨터에서 0과 1의 중첩을 의미한다.
역주. 원문은 “확률 $|x|^2$로 1을, 확률 $|y|^2$로 0을 측정한다”로 인쇄되어 있으나 0과 1이 서로 바뀐 것이다. 바로 아래에서 $(1, 0) = |0\rangle$, $(0, 1) = |1\rangle$로 두므로 $(x, y) = x|0\rangle + y|1\rangle$의 첫 좌표 $x$는 $|0\rangle$의 계수이고, 따라서 확률 $|x|^2$로 측정되는 값은 0이다. 원문 §4.5의 측정 규칙(고유벡터 $v_i$의 계수 $a_i$에 대하여 고유값 $\lambda_i$가 확률 $|a_i|^2$로 측정된다)과 연습문제 4.23($v = \frac{1}{\sqrt5}|0\rangle + \frac{2}{\sqrt5}|1\rangle$에서 $|0\rangle$의 고유값이 확률 $\frac15$로 측정된다)도 이 바른 순서를 따른다.
또한 $(1, 0), (0, 1)$을 각각 $|0\rangle, |1\rangle$이라 쓰자. 예를 들어 $(2, 3) = 2|0\rangle + 3|1\rangle$이다. 모든 1-큐비트는 다음을 만족하는 $a|0\rangle + b|1\rangle$의 꼴로 나타낼 수 있다.
| 고전컴퓨터 | 양자컴퓨터 | |
|---|---|---|
| 정보의 단위 | 비트 $0, 1$ | 큐비트, $\mathbb{C}^2$의 단위벡터 ($ae_1 + be_2, |a|^2 + |b|^2 = 1$) |
Let’s denote $(1, 0), (0, 1)$ by $e_1, e_2$, respectively. It means that $(x, y) = xe_1 + ye_2$.
If we measure a qubit $(x, y)$, then we measure 1 with probability $|x|^2$ and 0 with probability $|y|^2$, i.e., this means the superposition of 0 and 1 in classical computer.
Moreover, denote $(1, 0), (0, 1)$ by $|0\rangle, |1\rangle$, respectively. For example, $(2, 3) = 2|0\rangle + 3|1\rangle$. Every one qubit can be expressed as the following form $a|0\rangle + b|1\rangle$ such that
| classical computer | quantum computer | |
|---|---|---|
| unit information | a bit $0, 1$ | a qubit, a unit vector in $\mathbb{C}^2$ ($ae_1 + be_2, |a|^2 + |b|^2 = 1$) |
빈칸을 채워라.
“양자컴퓨팅의 기본 아이디어는 $\boxed{\ (a)\ }$와 $\boxed{\ (b)\ }$의 장점을 결합하는 데 기초한다.
단원 도입부에서 보았듯이, 양자컴퓨터는 파동의 장점(아날로그 컴퓨터)과 입자의 장점(디지털 컴퓨터)을 모두 활용하기 위해 중첩과 붕괴를 이용한다. 따라서
$\boxed{\ (a)\ }$ = 아날로그 컴퓨터, $\boxed{\ (b)\ }$ = 디지털 컴퓨터.
완성된 문장: “양자컴퓨팅의 기본 아이디어는 아날로그 컴퓨터의 장점(파동)과 디지털 컴퓨터의 장점(입자)을 결합하는 데 기초한다.”
Fill the blanks
“the basis idea of quantum computing is based on combining advantage of $\boxed{\ (a)\ }$ and $\boxed{\ (b)\ }$.
As stated in the introduction to this unit, quantum computers use superposition and collapse to exploit both the advantage of waves (the analog computer) and the advantage of particles (the digital computer). Hence
$\boxed{\ (a)\ }$ = the analog computer, $\boxed{\ (b)\ }$ = the digital computer.
Completed sentence: “the basic idea of quantum computing is based on combining advantage of the analog computer (waves) and the digital computer (particles).”
설명하라.
1. 아날로그 컴퓨터의 장점
2. 디지털 컴퓨터의 장점
3. 아날로그 컴퓨터의 단점
1. 아날로그 컴퓨터의 장점은 연산이 효율적이라는 것이다. 예를 들어 전류 $A$가 흐르는 도선 두 개와 전류 $B$가 흐르는 도선 하나가 한 점에서 만나면, 키르히호프 전류 법칙에 의해 만난 뒤의 전류는 즉시 물리적으로 $A+B$가 된다. 반면 디지털 컴퓨터에서 같은 덧셈을 하려면 각 수를 비트로 나타내고(예를 들어 9자리 수는 30자리 비트가 된다) 비트별 덧셈 연산 하나하나에 비용을 치러야 하므로, 이 경우 아날로그 컴퓨터가 더 효율적이다.
2. 디지털 컴퓨터의 장점은 데이터가 0과 1로 이루어진 디지털 데이터라는 것이다. 이는 데이터의 입력과 출력을 편리하게 한다.
3. 아날로그 컴퓨터의 단점은 데이터의 입력과 출력이 어렵고, 연산에 이상적인 환경이 필요하다는 것이다.
Explain
1. advantages of analog computer
2. advantages of digital computer
3. disadvantage of analog computer
1. The advantage of analog computers is that operations are efficient. For example, if two wires carrying current $A$ and one wire carrying current $B$ meet at a point, Kirchhoff’s current law makes the current after the meeting point equal to $A+B$ instantly and physically. By contrast, performing the same addition on a digital computer requires expressing each number in bits (a 9-digit number becomes 30 bits, for instance) and paying a cost for every single bit-addition, so in this case the analog computer is more efficient.
2. The advantage of digital computers is that their data are digital, consisting of 0 and 1. This makes it convenient to input and output data.
3. The disadvantage of analog computers is that data are difficult to input and output, and computation requires an ideal environment.
큐비트란 무엇인가?
큐비트는 $\mathbb{C}^2$의 단위벡터 $(x,y)$, 즉 $a|0\rangle+b|1\rangle$ ($|a|^2+|b|^2=1$) 꼴의 벡터로 이루어진, 양자컴퓨터에서 정보의 단위이다(정의 4.1). 고전적인 비트 0과 1의 중첩으로 볼 수 있으며, 큐비트 $(x,y) = x|0\rangle+y|1\rangle$을 측정하면 확률 $|x|^2$로 0을, 확률 $|y|^2$로 1을 측정한다(측정 후 상태는 그 결과로 붕괴한다). 원문 §4.1은 0과 1을 서로 바꾸어 인쇄했다(§4.1 NOTE의 역주 참고).
What is a qubit?
A qubit is the unit of information in a quantum computer, given by a unit vector $(x,y) \in \mathbb{C}^2$, i.e. a vector of the form $a|0\rangle + b|1\rangle$ with $|a|^2+|b|^2=1$ (Definition 4.1). It can be viewed as a superposition of the classical bits 0 and 1: if we measure a qubit $(x,y) = x|0\rangle + y|1\rangle$, we measure 0 with probability $|x|^2$ and 1 with probability $|y|^2$ (the state then collapses to that outcome). The notes print 0 and 1 the other way round in §4.1; see the translator’s note there.
다음 벡터들을 $|0\rangle$과 $|1\rangle$의 일차결합으로 나타내라.
1. $(2, 4)$
2. $(7, 2)$
3. $\left(\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}}\right)$
1. $(2, 4) = 2e_1+4e_2 = 2|0\rangle+4|1\rangle$.
2. $(7, 2) = 7|0\rangle+2|1\rangle$.
3. $\left(\frac{1}{\sqrt2},-\frac{1}{\sqrt2}\right) = \frac{1}{\sqrt2}|0\rangle-\frac{1}{\sqrt2}|1\rangle$.
참고. 정의 4.1에 의해 큐비트는 $\mathbb{C}^2$의 단위벡터여야 한다. $\left|\frac{1}{\sqrt2}\right|^2+\left|-\frac{1}{\sqrt2}\right|^2 = \frac12+\frac12=1$이므로 셋 중 (3)만 단위벡터, 즉 실제 큐비트이다. (1)의 노름은 $\sqrt{2^2+4^2}=\sqrt{20}$이고 (2)의 노름은 $\sqrt{7^2+2^2}=\sqrt{53}$이므로, 이들을 큐비트로 만들려면 각각 $\sqrt{20}$, $\sqrt{53}$으로 나누어 $\frac{1}{\sqrt{20}}(2,4) = \frac{2}{\sqrt{20}}|0\rangle+\frac{4}{\sqrt{20}}|1\rangle$, $\frac{1}{\sqrt{53}}(7,2)=\frac{7}{\sqrt{53}}|0\rangle+\frac{2}{\sqrt{53}}|1\rangle$로 정규화해야 한다.
Express the following vectors as a linear combination of $|0\rangle$ and $|1\rangle$,
1. $(2, 4)$
2. $(7, 2)$
3. $\left(\frac{1}{\sqrt{2}}, -\frac{1}{\sqrt{2}}\right)$
1. $(2, 4) = 2e_1+4e_2 = 2|0\rangle+4|1\rangle$.
2. $(7, 2) = 7|0\rangle+2|1\rangle$.
3. $\left(\frac{1}{\sqrt2},-\frac{1}{\sqrt2}\right) = \frac{1}{\sqrt2}|0\rangle-\frac{1}{\sqrt2}|1\rangle$.
Remark. By Definition 4.1 a qubit must be a unit vector in $\mathbb{C}^2$. Since $\left|\frac{1}{\sqrt2}\right|^2+\left|-\frac{1}{\sqrt2}\right|^2=\frac12+\frac12=1$, only (3) is a unit vector, i.e. an actual qubit. The norm of (1) is $\sqrt{2^2+4^2}=\sqrt{20}$ and of (2) is $\sqrt{7^2+2^2}=\sqrt{53}$, so to turn them into qubits they would need to be normalized as $\frac{1}{\sqrt{20}}(2,4) = \frac{2}{\sqrt{20}}|0\rangle+\frac{4}{\sqrt{20}}|1\rangle$ and $\frac{1}{\sqrt{53}}(7,2)=\frac{7}{\sqrt{53}}|0\rangle+\frac{2}{\sqrt{53}}|1\rangle$, respectively.
4.2 n-qubit · n-큐비트
1. 2-큐비트는 하나의 큐비트 $\otimes$ 하나의 큐비트로 정의된다. 즉 2-큐비트는 다음과 같은 꼴이다.
여기서 $a, b, c, d \in \mathbb{C}$, $|a|^2 + |b|^2 = 1$, $|c|^2 + |d|^2 = 1$이다. 다항식의 전개와 마찬가지로 위 텐서곱은 다음과 같이 계산할 수도 있다.
간단히 말해,
2. $n$-큐비트는 다음과 같은 꼴이다.
여기서 $a_i, b_i \in \mathbb{C}$이고 모든 $i \le n$에 대하여 $|a_i|^2 + |b_i|^2 = 1$이다.
1. Two-qubit is defined by one qubit $\otimes$ one qubit. It means that two-qubit is the form of
where $a, b, c, d \in \mathbb{C}$, $|a|^2 + |b|^2 = 1$ and $|c|^2 + |d|^2 = 1$. Like polynomial expansion, the above tensor can also be computed as follows:
Simply,
2. $n$-qubit is the form of
where $a_i, b_i \in \mathbb{C}$, $|a_i|^2 + |b_i|^2 = 1$ for all $i \le n$.
$|ac|^2 + |ad|^2 + |bc|^2 + |bd|^2 = (|a|^2 + |b|^2)(|c|^2 + |d|^2) = 1$임에 주의하라. $|ab\rangle := |a\rangle \otimes |b\rangle$로 간단히 표기한다.
Note that $|ac|^2 + |ad|^2 + |bc|^2 + |bd|^2 = (|a|^2 + |b|^2)(|c|^2 + |d|^2) = 1$. We simply denote $|ab\rangle := |a\rangle \otimes |b\rangle$.
4.3 Classical gate · 고전 게이트
고전 게이트는 이진 데이터에 대한 기본적인 논리 연산을 수행하는 데 쓰이는, 디지털 논리 회로의 기본 구성 요소이다. $T$(참)는 1에, $F$(거짓)는 0에 대응한다고 하자.
A classical gate is a fundamental building block in digital logic circuits used to perform basic logical operations on binary data. Assumte that $T : true$ corresponds 1 and $F : False$ corresponds 0.
“AND 게이트”와 “OR 게이트”에서 입력 데이터의 개수는 2개이며, 이를 $A$, $B$로 표기한다. 그리고 출력 데이터의 개수는 1개이며, 이를 $C$로 표기한다. 아래 그림과 같다.
1. AND 게이트는 다음 진리표에 따라 동작하는 기본적인 디지털 논리 게이트이다.
| $A$ | $B$ | $C(A \wedge B)$ |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
AND 게이트는 법 2에 대한 곱셈으로 볼 수 있다. 즉 $AB \equiv C \ (\bmod\ 2)$이다.
2. OR 게이트는 다음 진리표에 따라 동작하는 기본적인 디지털 논리 게이트이다.
| $A$ | $B$ | $C(A \vee B)$ |
|---|---|---|
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | F |
역주. 원문 표 머리의 $A \wedge B$는 $A \vee B$의 오타이다.
OR 게이트는 $(A+1)(B+1)+1 \equiv C \ (\bmod\ 2)$로 볼 수 있다.
3. “NOT 게이트”에서 입력 데이터의 개수는 1개이며, 이를 $A$로 표기한다. 그리고 출력 데이터의 개수는 1개이며, 이를 $C$로 표기한다. 아래 그림과 같다.
역주. 원문 그림은 AND 게이트와 같은 기호로 그려져 있다(표준 NOT 기호는 삼각형과 작은 원).
NOT 게이트는 다음 진리표에 따라 동작하는 기본적인 디지털 논리 게이트이다.
| $A$ | $C$ |
|---|---|
| T | F |
| F | T |
At the ”And gate” and ”Or gate”, the number of input data is 2, which we will denote as $A$ and $B$. And the number of output data is 1, which we will denote as $C$. It looks like the figure below.
1. The And gate is a basic digital logical gate behaves according to the truth table.
| $A$ | $B$ | $C(A \wedge B)$ |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
And gate can be viewed as multiplication modulo 2, it means that $AB \equiv C \ (\bmod\ 2)$.
2. The Or gate is a basic digital logical gate behaves according to the truth table.
| $A$ | $B$ | $C(A \wedge B)$ |
|---|---|---|
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | F |
Or gate can be viewed as $(A+1)(B+1)+1 \equiv C \ (\bmod\ 2)$.
3. At the ”Not gate”, the number of input data is 1, which we will denote as $A$. And the number of output data is 1, which we will denote as $C$. It looks like the figure below.
The Not gate is a basic digital logical gate behaves according to the truth table.
| $A$ | $C$ |
|---|---|
| T | F |
| F | T |
사실 모든 게이트는 “and”, “or”, “not” 게이트를 사용하여 구현할 수 있다. 이것이 범용 게이트 정리이다.
In fact, any gates can be implemented by using “and”, “or” and “not” gate. It is universal gate theorem.
4.4 Quantum gate · 양자 게이트
1. $A \in M_{n \times n}(\mathbb{C})$가 $A\overline{A}^{T} = I_n$을 만족하면, 즉 $A^{-1} = \overline{A}^{T}$이면 $A$는 유니터리라고 한다.
2. 1-큐비트에 대한 양자 게이트는 유니터리 $2 \times 2$ 행렬이다.
예를 들어,
1. $A \in M_{n \times n}(\mathbb{C})$ is unitary if $A\overline{A}^{T} = I_n$, i.e., $A^{-1} = \overline{A}^{T}$
2. A quantum gate for 1-qubit is a unitary $2 \times 2$ matrix.
For example,
$|0\rangle = (1, 0)$, $|1\rangle = (0, 1)$이라 하자. 그러면 $U := \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$는 양자 “not” 게이트이다.
Let $|0\rangle = (1, 0)$ and $|1\rangle = (0, 1)$. Then $U := \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$ is quantum “not” gate.
$n$-큐비트는 $(a_1|0\rangle + b_1|1\rangle) \otimes \cdots \otimes (a_n|0\rangle + b_n|1\rangle) \in \mathbb{C}^{2^n}$의 꼴임에 주의하라. 양자 게이트는 유니터리 행렬이므로, 양자 게이트는 $n$-큐비트를 $n$-큐비트로 보낸다는(차원이 같다는) 것을 알 수 있다.
Note that $n$-qubit is the form of $(a_1|0\rangle + b_1|1\rangle) \otimes \cdots \otimes (a_n|0\rangle + b_n|1\rangle) \in \mathbb{C}^{2^n}$. Since quantum gates are unitary matrix, we know that quantum gates send $n$-qubit to $n$-qubit (same dimension).
1. 제어 NOT 게이트는 다음 진리표에 따라 동작하는 양자 논리 게이트이다.
| $A$ | $B$ | $A'$ | $B'$ |
|---|---|---|---|
| $|0\rangle$ | $|0\rangle$ | $|0\rangle$ | $|0\rangle$ |
| $|0\rangle$ | $|1\rangle$ | $|0\rangle$ | $|1\rangle$ |
| $|1\rangle$ | $|0\rangle$ | $|1\rangle$ | $|1\rangle$ |
| $|1\rangle$ | $|1\rangle$ | $|1\rangle$ | $|0\rangle$ |
$|0\rangle|0\rangle = (1, 0, 0, 0)$, $|0\rangle|1\rangle = (0, 1, 0, 0)$, $|1\rangle|0\rangle = (0, 0, 1, 0)$, $|1\rangle|1\rangle = (0, 0, 0, 1)$이라 하자. 그러면 CNOT 게이트에 대응하는 행렬은 다음과 같다.
2. $X$ 게이트와 $Z$ 게이트는 다음을 만족하는 단일 게이트의 예이다.
계산하여 $X$ 게이트와 $Z$ 게이트에 대응하는 행렬을 구하라.
1. Controlled not gate is a quantum logical gate behaves according to the truth table.
| $A$ | $B$ | $A'$ | $B'$ |
|---|---|---|---|
| $|0\rangle$ | $|0\rangle$ | $|0\rangle$ | $|0\rangle$ |
| $|0\rangle$ | $|1\rangle$ | $|0\rangle$ | $|1\rangle$ |
| $|1\rangle$ | $|0\rangle$ | $|1\rangle$ | $|1\rangle$ |
| $|1\rangle$ | $|1\rangle$ | $|1\rangle$ | $|0\rangle$ |
Let $|0\rangle|0\rangle = (1, 0, 0, 0)$, $|0\rangle|1\rangle = (0, 1, 0, 0)$, $|1\rangle|0\rangle = (0, 0, 1, 0)$ and $|1\rangle|1\rangle = (0, 0, 0, 1)$. Then the matrix corresponding to the CNOT gate is as follows:
2. $X$-gate and $Z$-gate are example of single gate such that
Compute to find the matrix corresponding to the $X$ gate and $Z$ gate.
사실 모든 양자 게이트는 1-큐비트 게이트와 CNOT 게이트를 사용하여 구현된다.
In fact, every quantum gate is implemented by using 1-qubit gates and CNOT gate.
유니터리 행렬의 정의를 말하라.
$A \in M_{n\times n}(\mathbb{C})$가 $A\overline{A}^{T} = I_n$을 만족하면, 즉 $A^{-1} = \overline{A}^{T}$이면 $A$를 유니터리라고 한다(정의 4.8 (1)).
유니터리 행렬은 벡터의 노름을 보존한다: 임의의 $v \in \mathbb{C}^n$에 대하여 $\|Av\|^2 = (\overline{Av})^{T}(Av) = \overline{v}^{T}\overline{A}^{T}Av$인데, $A$가 유니터리이면 $\overline{A}^{T}A = A^{-1}A = I_n$이므로 $\|Av\|^2 = \overline{v}^Tv = \|v\|^2$이다. 따라서 유니터리 행렬은 단위벡터를 단위벡터로, 즉 큐비트를 큐비트로 보낸다 — 이것이 양자 게이트를 유니터리 행렬로 정의하는 이유이다.
Give the definition of a unitary matrix.
$A \in M_{n\times n}(\mathbb{C})$ is unitary if $A\overline{A}^{T} = I_n$, i.e. $A^{-1} = \overline{A}^{T}$ (Definition 4.8 (1)).
Unitary matrices preserve the norm of a vector: for any $v \in \mathbb{C}^n$, $\|Av\|^2 = (\overline{Av})^{T}(Av) = \overline{v}^{T}\overline{A}^{T}Av$, and if $A$ is unitary then $\overline{A}^{T}A = A^{-1}A = I_n$, so $\|Av\|^2 = \overline{v}^Tv = \|v\|^2$. Hence a unitary matrix sends a unit vector to a unit vector, i.e. it sends a qubit to a qubit — this is why quantum gates are defined to be unitary matrices.
빈칸을 채워라.
1. 양자 게이트는 $\boxed{\ (a)\ }$ 행렬로 나타낼 수 있다.
2. 모든 양자 게이트는 $\boxed{\ (b)\ }$와 $\boxed{\ (c)\ }$로 구현할 수 있다.
1. $\boxed{\ (a)\ }$ = 유니터리(unitary).
2. $\boxed{\ (b)\ }$ = 1-큐비트 게이트, $\boxed{\ (c)\ }$ = CNOT 게이트.
정의 4.8에 의해 1-큐비트에 대한 양자 게이트는 유니터리 $2\times2$ 행렬이고, 이어지는 서술(§4.4 말미)에서 보았듯이 모든 양자 게이트는 1-큐비트 게이트와 CNOT 게이트를 사용하여 구현된다.
Fill the blank
1. A quantum gate can be express as a $\boxed{\ (a)\ }$ matrix.
2. Every quantum gate can be implemented by $\boxed{\ (b)\ }$ and $\boxed{\ (c)\ }$
1. $\boxed{\ (a)\ }$ = a unitary matrix.
2. $\boxed{\ (b)\ }$ = 1-qubit gates, $\boxed{\ (c)\ }$ = the CNOT gate.
By Definition 4.8, a quantum gate for 1-qubit is a unitary $2\times2$ matrix, and as noted at the end of §4.4, every quantum gate is implemented by using 1-qubit gates and the CNOT gate.
$(|x|^2+|y|^2 = 1)$인 2-큐비트 $(x|0\rangle + y|1\rangle)\left(\frac{|0\rangle+|1\rangle}{\sqrt{2}}\right)$와 CNOT 게이트 $U$에 대하여 $U(x|0\rangle+y|1\rangle)\left(\frac{|0\rangle+|1\rangle}{\sqrt{2}}\right)$를 구하라.
텐서곱을 전개하면(정의 4.6 (1))
$|00\rangle=e_1,|01\rangle=e_2,|10\rangle=e_3,|11\rangle=e_4$(예제 4.10)로 나타내면 위 상태의 좌표벡터는 $\frac{1}{\sqrt2}(x,x,y,y)^T$이다. 예제 4.10에서 구한 CNOT 게이트의 행렬을 적용하면
즉 CNOT 게이트는 $|10\rangle$의 계수와 $|11\rangle$의 계수를 서로 바꾸지만, 두 계수가 모두 $y$로 같으므로 결과 벡터는 바뀌지 않는다. 따라서
즉 이 2-큐비트는 CNOT 게이트에 의해 변하지 않는다(상태가 그대로 보존된다).
Let $(x|0\rangle + y|1\rangle)\left(\frac{|0\rangle+|1\rangle}{\sqrt{2}}\right)$ be a 2-qubit where $(|x|^2+|y|^2 = 1)$ and $U$ be CNOT gate. Find $U(x|0\rangle+y|1\rangle)\left(\frac{|0\rangle+|1\rangle}{\sqrt{2}}\right)$.
Expanding the tensor product (Definition 4.6 (1)),
Writing $|00\rangle=e_1,|01\rangle=e_2,|10\rangle=e_3,|11\rangle=e_4$ (Example 4.10), the coordinate vector of this state is $\frac{1}{\sqrt2}(x,x,y,y)^T$. Applying the matrix of the CNOT gate found in Example 4.10,
That is, the CNOT gate swaps the coefficients of $|10\rangle$ and $|11\rangle$, but since both coefficients equal $y$, the resulting vector is unchanged. Hence
i.e. this 2-qubit is left unchanged by the CNOT gate (the state is preserved).
$U$가 다음을 만족하는 1-큐비트에 대한 양자 게이트라 하자.
$U$에 대응하는 행렬을 구하라.
양자 게이트 $U$에 대응하는 $2\times2$ 행렬의 열은 $U|0\rangle$과 $U|1\rangle$의 좌표이다(정의 4.8 (2), 예제 4.9). $|0\rangle=(1,0)$, $|1\rangle=(0,1)$이므로
실제로 $U\overline{U}^T = \frac12\begin{pmatrix}1&1\\1&-1\end{pmatrix}\begin{pmatrix}1&1\\1&-1\end{pmatrix} = \frac12\begin{pmatrix}2&0\\0&2\end{pmatrix}=I_2$이므로 $U$는 유니터리이고, 이는 $U$가 정당한 양자 게이트임을 확인해 준다(이 행렬이 바로 §4.6의 아다마르 게이트이다).
Let $U$ be a quantum gate for 1-qubit such that
Find the matrix corresponding to $U$.
The columns of the $2\times2$ matrix corresponding to a quantum gate $U$ are the coordinates of $U|0\rangle$ and $U|1\rangle$ (Definition 4.8 (2), Example 4.9). Since $|0\rangle=(1,0)$ and $|1\rangle=(0,1)$,
Indeed $U\overline{U}^T = \frac12\begin{pmatrix}1&1\\1&-1\end{pmatrix}\begin{pmatrix}1&1\\1&-1\end{pmatrix} = \frac12\begin{pmatrix}2&0\\0&2\end{pmatrix}=I_2$, so $U$ is unitary, confirming that $U$ is a legitimate quantum gate (this matrix is exactly the Hadamard gate of §4.6).
$U$가 다음을 만족하는 2-큐비트에 대한 양자 게이트라 하자.
$|0\rangle|0\rangle := (1, 0, 0, 0), |0\rangle|1\rangle := (0, 1, 0, 0), |1\rangle|0\rangle := (0, 0, 1, 0)$, $|1\rangle|1\rangle := (0, 0, 0, 1)$이라 하자. $U$에 대응하는 행렬을 구하라.
$|0\rangle|0\rangle=e_1,|0\rangle|1\rangle=e_2,|1\rangle|0\rangle=e_3,|1\rangle|1\rangle=e_4$라 하자. 주어진 대응 $(0,0)\mapsto(0,1)$, $(0,1)\mapsto(1,0)$, $(1,0)\mapsto(1,1)$, $(1,1)\mapsto(0,0)$은
을 뜻한다. $U$에 대응하는 행렬의 $i$번째 열은 $Ue_i$의 좌표이므로(정의 4.8 (2))
이 행렬은 표준기저벡터들을 순환시키는 치환행렬이므로 각 행과 열에 $1$이 정확히 하나씩 있고, 따라서 $U\overline{U}^T=I_4$, 즉 $U$는 유니터리이다.
Let $U$ be the quantum gate for 2-qubit such that
Let $|0\rangle|0\rangle := (1, 0, 0, 0), |0\rangle|1\rangle := (0, 1, 0, 0), |1\rangle|0\rangle := (0, 0, 1, 0)$ and $|1\rangle|1\rangle := (0, 0, 0, 1)$. Find a matrix corresponding to $U$.
Let $|0\rangle|0\rangle=e_1,|0\rangle|1\rangle=e_2,|1\rangle|0\rangle=e_3,|1\rangle|1\rangle=e_4$. The given correspondence $(0,0)\mapsto(0,1)$, $(0,1)\mapsto(1,0)$, $(1,0)\mapsto(1,1)$, $(1,1)\mapsto(0,0)$ means that
The $i$-th column of the matrix corresponding to $U$ is the coordinate vector of $Ue_i$ (Definition 4.8 (2)), so
This matrix is a permutation matrix cycling the standard basis vectors, so each row and column contains exactly one $1$, and hence $U\overline{U}^T=I_4$, i.e. $U$ is unitary.
$X$ 게이트와 $Z$ 게이트에 대응하는 행렬을 구하고 그것이 옳음을 증명하라.
역주. 원문 문장이 미완이어서(“Prove that matrices corresponding the $X$ gate and $Z$ gate”), 두 게이트에 대응하는 행렬을 구하고 그것이 각 게이트를 나타냄을 증명한다.
예제 4.10 (2)의 회로도에 따르면 $X$ 게이트는 $\alpha|0\rangle+\beta|1\rangle$을 $\beta|0\rangle+\alpha|1\rangle$로, $Z$ 게이트는 $\alpha|0\rangle+\beta|1\rangle$을 $\alpha|0\rangle-\beta|1\rangle$로 보내는 1-큐비트 게이트이다.
$X$ 게이트. $X := \begin{pmatrix} 0&1\\1&0\end{pmatrix}$라 하면
즉 $X(\alpha|0\rangle+\beta|1\rangle) = \beta|0\rangle+\alpha|1\rangle$이므로 $X$는 $X$ 게이트가 요구하는 대응을 그대로 준다.
$Z$ 게이트. $Z := \begin{pmatrix} 1&0\\0&-1\end{pmatrix}$라 하면
즉 $Z(\alpha|0\rangle+\beta|1\rangle) = \alpha|0\rangle-\beta|1\rangle$이므로 $Z$는 $Z$ 게이트가 요구하는 대응을 그대로 준다.
이 행렬들이 유일함을 보이자. 정의 4.8에 의해 게이트는 선형사상(유니터리 행렬)이므로, 기저 $|0\rangle,|1\rangle$에서의 값 $U|0\rangle,U|1\rangle$이 정해지면 $U$ 전체가 결정되고, $U$에 대응하는 행렬의 열은 각각 $U|0\rangle, U|1\rangle$의 좌표이다(예제 4.9, 4.10과 같은 방식). $X$ 게이트는 $|0\rangle\mapsto|1\rangle$, $|1\rangle\mapsto|0\rangle$을 만족해야 하므로 대응 행렬의 열은 $(0,1)^T,(1,0)^T$뿐이고, 즉 대응 행렬은 $X$뿐이다. 마찬가지로 $Z$ 게이트는 $|0\rangle\mapsto|0\rangle$, $|1\rangle\mapsto-|1\rangle$을 만족해야 하므로 대응 행렬은 $Z$뿐이다.
마지막으로 $X, Z$가 유니터리임을 확인하면(정의 4.8 (1))
이므로 $X$와 $Z$는 유니터리 행렬이고, 따라서 각각 정당한 양자 게이트이다.
Prove that matrices corresponding the $X$gate and $Z$gate.
Note. The statement is printed incompletely (“Prove that matrices corresponding the $X$ gate and $Z$ gate”); we find the matrices and prove they represent the gates.
By the circuit diagrams in Example 4.10 (2), the $X$ gate is a 1-qubit gate sending $\alpha|0\rangle+\beta|1\rangle$ to $\beta|0\rangle+\alpha|1\rangle$, and the $Z$ gate sends $\alpha|0\rangle+\beta|1\rangle$ to $\alpha|0\rangle-\beta|1\rangle$.
The $X$ gate. Let $X := \begin{pmatrix} 0&1\\1&0\end{pmatrix}$. Then
i.e. $X(\alpha|0\rangle+\beta|1\rangle) = \beta|0\rangle+\alpha|1\rangle$, so $X$ realizes exactly the correspondence required of the $X$ gate.
The $Z$ gate. Let $Z := \begin{pmatrix} 1&0\\0&-1\end{pmatrix}$. Then
i.e. $Z(\alpha|0\rangle+\beta|1\rangle) = \alpha|0\rangle-\beta|1\rangle$, so $Z$ realizes exactly the correspondence required of the $Z$ gate.
We show these matrices are unique. By Definition 4.8, a gate is a linear map (a unitary matrix), so it is determined once its values $U|0\rangle, U|1\rangle$ on the basis $|0\rangle, |1\rangle$ are fixed, and the columns of the matrix corresponding to $U$ are the coordinates of $U|0\rangle$ and $U|1\rangle$ (as in Examples 4.9 and 4.10). The $X$ gate must satisfy $|0\rangle\mapsto|1\rangle$ and $|1\rangle\mapsto|0\rangle$, so the columns of its matrix are $(0,1)^T,(1,0)^T$ and nothing else, i.e. the matrix is $X$. Likewise the $Z$ gate must satisfy $|0\rangle\mapsto|0\rangle$ and $|1\rangle\mapsto-|1\rangle$, so its matrix is $Z$ and nothing else.
Finally, we check that $X, Z$ are unitary (Definition 4.8 (1)):
so $X$ and $Z$ are unitary matrices, and hence each is a legitimate quantum gate.