Lesson 02 Pauli gate


Lesson 02.1: Pauli X gate
The Pauli X gate is a π-rotation around the X axis and has the property that X → X, Z → −Z. Also referred to as a bit-flip.
這個閘相當於電子學的邏輯反閘bit-flip, 將基本狀態 | 0 ⟩ 變成 | 1 ⟩, 而 | 1 ⟩ 變成 | 0 ⟩
matrix form: pauli x matrix
| 0 1 |
| 1 0 |

quantum assembly language (QASM): gate x a {u3(pi,0,pi) a;}
x q[0];
x q[1];


Lesson 02.2: Pauli Y gate
The Pauli Y gate is a π-rotation around the Y axis and has the property that X → −X, Z → −Z. This is both a bit-flip and phase-flip, and satisfies Y = XZ.
matrix form: pauli y matrix
| 0 -i |
| i  0 |

quantum assembly language (QASM): gate y a {u3(pi,pi/2,pi/2) a;}
y q[0];
y q[1];


Lesson 02.3: Pauli Z gate
The Pauli Z gate is a π-rotation around the Z axis and has the property that X → −X, Z → Z. Also referred to as a phase-flip. 泡利-Z 閘操作單一個量子位元。 這個閘保留基本狀態 | 0 ⟩ 不變並且將 | 1 ⟩ 變換成 − | 1 ⟩
matrix form: pauli z matrix
| 1  0 |
| 0 -1 |

quantum assembly language (QASM): gate z a {u1(pi) a;}
z q[0];
z q[1];