Introduction
to Quantum Technology (量子科技概論) 2024
Lecturer: 江振瑞
Teaching Assistant (TA):
楊
杰恩
Time: (11/22、11/29)週五
13:00~15:50
Place: 光電大樓 IL-116
Goal: To guide students to understand the basic principles of
quantum computing through programming. (帶領學生透過程式設計了解量子計算基本原理)
Scoring:
- exercise (programming) (40%)
- project (programming) (45%)
- questionnaire (15%)
Textbooks:
Textbook Source Code:
Reference Books:
- 張元翔, 量子電腦與量子計算, �眳p資訊, 2020.
- 陳建宏(譯), 量子計算實戰, �眳p資訊, 2020.
- 莊永裕(譯), 圖解量子電腦入門, 臉譜, 2020.
- 林志鴻等, 量子電腦應用與世界級競賽實務, 2021.
- Jack D. Hidary, Quantum Computing: An Applied Approach (2nd
Ed), 2021.
- Chris Bernhardt, Quantum Computing for Everyone, 2020.
- Nihal Mehta, Quantum Computing -- Program Next-Gen Computers
for Hard, Real-World Applications, 2020.
- Michael A. Nielsen, and Isaac L. Chuang, Quantum Computation
and Quantum Information, 2002.
Syllabus:
- (11/22) (11/29) Quantum
programming for the first time (Introduction to IBM Q
quantum computer and D-Wave quantum computer) (QBookCh1.zip)
(QBookCh2.zip)(QBookCh3.zip)(QBookCh4.zip)(QBookCh5.zip)(QBookCh6.zip)(QBookCh7.zip)
- Use Qiskit 0.XX to be
compatible with my source
!pip install qiskit[visualization]==0.43.0 #This is an
old but stable version that is compatible with my codes
!pip install qiskit.aer
- Migrate from Qiskit 0.XX to
Qiskit 1.XX
1. !pip install qiskit.aer => !pip
install qiskit-aer
2. from qiskit.providers.aer import AerSimulator => from
qiskit_aer import AerSimulator
3. 3. from qiskit import execute => from qiskit import
transpile
4. The qiskit.execute function is not available in Qiskit
1.XX. This function served as a high-level wrapper around the
transpile and run functions in Qiskit. Instead of
qiskit.execute, use the transpile function followed by
backend.run().
# Legacy path
from qiskit import execute
job = execute(circuit, backend)
# New path
from qiskit import transpile
new_circuit = transpile(circuit, backend)
job = backend.run(new_circuit)
- #Installing
the following two packages for running quantum circuit with
simulator in Qiskit 1.xx
!pip install qiskit[visualization]==1.2 #Install Qiskit 1.2
with visualization tools
!pip install qiskit-aer #install qiskit.aer for version
before 1.X
- from qiskit import
transpile #for qiskit 1.0 or later
from qiskit_aer import AerSimulator #for qiskit 1.0 or later
from qiskit.visualization import plot_histogram
backend = AerSimulator()
transpiled_circuit = transpile(qc, backend=backend)
job = backend.run(transpiled_circuit,shots = 1000)
result = job.result()
counts = result.get_counts()
total_shots = sum(counts.values())
prob = {key: value / total_shots for key, value in
counts.items()}
plot_histogram(prob)
- Exercise:
(Due 11/28 23:59)
Write a program in the form
of ipynb to generate the following
Bell-state quantum circuit and its
associated measurement results.

- Project:
(Due 12/4 23:59) (繳交ipynb檔案)
基於下列常數 - 平衡函數判斷問題的黑箱函數
f,設計量子程式建構並顯示對應的Deutsch-Jozsa 演算法量子線路,並在量子電腦模擬器上執行量子線路
1000 次,顯示其量子位元測量結果各種不同量子態被測量出的次數及其對應的直方圖,最後並說明為何測量結果代表黑箱函數
f 為平衡函數。
𝑓: {0, 1}3→ {0, 1}
𝑦 = 𝑓( 𝑥2𝑥1𝑥0
) = 1, if 𝑥1
= 1; otherwise, 𝑦 = 𝑓( 𝑥2𝑥1𝑥0
) = 0