Difference between revisions of "BSTE:IntroductionToQuantumProgramming"

From IU
Jump to navigation Jump to search
(Bloom's)
 
(12 intermediate revisions by the same user not shown)
Line 52: Line 52:
 
{|
 
{|
 
|+ Course grade breakdown
 
|+ Course grade breakdown
!align="center"|
 
 
!align="center"|
 
!align="center"|
 
!align="center"| '''Proposed points'''
 
!align="center"| '''Proposed points'''
 
|-
 
|-
 
|align="center"| Labs/seminar classes
 
|align="center"| Labs/seminar classes
|align="center"| 20
 
 
|align="center"| 0
 
|align="center"| 0
 
|-
 
|-
 
|align="center"| Interim performance assessment
 
|align="center"| Interim performance assessment
|align="center"| 30
+
|align="center"| 20
|align="center"| 0
 
 
|-
 
|-
 
|align="center"| Assessments
 
|align="center"| Assessments
|align="center"| 0
 
 
|align="center"| 60
 
|align="center"| 60
 
|-
 
|-
 
|align="center"| Exams
 
|align="center"| Exams
|align="center"| 50
+
|align="center"| 20
|align="center"| 40
 
 
|}
 
|}
   
 
If necessary, please indicate freely your course’s features in terms of students’ performance assessment:
 
If necessary, please indicate freely your course’s features in terms of students’ performance assessment:
   
  +
Students pass 3 homeworks 20 points each. 20 points are given for in-class performance (solving the labs and whiteboard examples). 20 points go to the exam.
TODO
 
   
 
=== Grades range ===
 
=== Grades range ===
Line 81: Line 76:
 
{|
 
{|
 
|+ Course grading range
 
|+ Course grading range
!align="center"|
 
 
!align="center"|
 
!align="center"|
 
!align="center"| '''Proposed range'''
 
!align="center"| '''Proposed range'''
 
|-
 
|-
 
|align="center"| A. Excellent
 
|align="center"| A. Excellent
|align="center"| 90-100
 
 
|align="center"| 80-100
 
|align="center"| 80-100
 
|-
 
|-
 
|align="center"| B. Good
 
|align="center"| B. Good
|align="center"| 75-89
+
|align="center"| 65-79
|align="center"| 60-79
 
 
|-
 
|-
 
|align="center"| C. Satisfactory
 
|align="center"| C. Satisfactory
|align="center"| 60-74
+
|align="center"| 50-64
|align="center"| 40-59
 
 
|-
 
|-
 
|align="center"| D. Poor
 
|align="center"| D. Poor
|align="center"| 0-59
+
|align="center"| 0-49
|align="center"| 0-39
 
 
|}
 
|}
   
Line 106: Line 96:
 
Main textbook:
 
Main textbook:
   
  +
* [https://www.amazon.com/Programming-Quantum-Computers-Essential-Algorithms/dp/1492039683 Programming Quantum Computers: Essential Algorithms and Code Samples]
* TODO
 
  +
* [https://qiskit.org/textbook/preface.html Qiskit textbook]
* TODO
 
  +
* [https://gitlab.com/qworld/bronze-qiskit QBronze workshop materials]
   
 
Other reference material:
 
Other reference material:
   
  +
* [https://gitlab.com/qworld/silver QSilver workshop]
* TODO
 
   
 
== Course Sections ==
 
== Course Sections ==
Line 124: Line 115:
 
|-
 
|-
 
|align="center"| 1
 
|align="center"| 1
  +
| Single qubit
| S1
 
 
|align="center"| 12
 
|align="center"| 12
 
|-
 
|-
 
|align="center"| 2
 
|align="center"| 2
  +
| 2 qubit operations
| S2
 
|align="center"| 16
+
|align="center"| 8
 
|-
 
|-
 
|align="center"| 3
 
|align="center"| 3
  +
| quantum data representation
| S3
 
|align="center"| 12
+
|align="center"| 10
 
|-
 
|-
 
|align="center"| 4
 
|align="center"| 4
  +
| quantum building blocks
| S4
 
|align="center"| 20
+
|align="center"| 4
  +
|-
  +
|align="center"| 5
  +
| quantum optimization and machine learning
  +
|align="center"| 6
 
|}
 
|}
   
Line 144: Line 139:
 
==== Section title: ====
 
==== Section title: ====
   
  +
Single Qubit
S1
 
   
=== Topics covered in this section: ===
+
==== Topics covered in this section: ====
   
* TODO
+
* Qubit
  +
* Superposition
  +
* Quantum states, vector representation, and bra-ket notation
  +
* Single qubit gates NOT, READ/WRITE, HADAMARD, ROT, PHASE
   
=== What forms of evaluation were used to test students’ performance in this section? ===
+
==== What forms of evaluation were used to test students’ performance in this section? ====
   
 
{|
 
{|
Line 181: Line 179:
 
|}
 
|}
   
=== Typical questions for ongoing performance evaluation within this section ===
+
==== Typical questions for ongoing performance evaluation within this section ====
   
  +
# Express a superposed state with given probabilities of realization in bra-ket notation
# TODO
 
  +
# Compute the state given a sequence of gates
# TODO
 
  +
# Prepare a desired quantum state given single-qubit operations
  +
# What is the difference between Unitary and Stochastic matrices?
   
=== Typical questions for seminar classes (labs) within this section ===
+
==== Typical questions for seminar classes (labs) within this section ====
   
  +
# Prepare a desired state given single-qubit operations
# TODO
 
  +
# Apply Hadamard gate to |+>
  +
# What is Matrix exponentiation?
   
=== Test questions for final assessment in this section ===
+
==== Test questions for final assessment in this section ====
   
  +
# Find eigenstates of Hadamard operator
# TODO
 
  +
# Prepare a desired quantum state
   
 
=== Section 2 ===
 
=== Section 2 ===
Line 198: Line 201:
 
==== Section title: ====
 
==== Section title: ====
   
  +
2 qubit operations
S2
 
  +
  +
==== Topics covered in this section: ====
   
  +
* 2-qubit operations
=== Topics covered in this section: ===
 
  +
* CNOT
  +
* CU: CPHASE, CZ, SWAP
  +
* CC-U: Toffoli
  +
* Implementation of arbitrary C-U and CC-U gates
   
* TODO
 
   
=== What forms of evaluation were used to test students’ performance in this section? ===
+
==== What forms of evaluation were used to test students’ performance in this section? ====
   
 
{|
 
{|
Line 235: Line 243:
 
|}
 
|}
   
=== Typical questions for ongoing performance evaluation within this section ===
+
==== Typical questions for ongoing performance evaluation within this section ====
   
  +
# Compute tensor product of 2 matrices
# TODO
 
  +
# Implement C-RotX(phi) gate
# TODO
 
  +
# Compute CNOT^(-1)
   
=== Typical questions for seminar classes (labs) within this section ===
+
==== Typical questions for seminar classes (labs) within this section ====
   
  +
# Apply CNOT to |+0> in matrix form
# TODO
 
  +
# Implement CC-H gate using 2-qubit gates only
  +
# Compute CCNOT^(-1)
   
=== Test questions for final assessment in this section ===
+
==== Test questions for final assessment in this section ====
   
  +
# Implement CZ gate
# TODO
 
  +
# Implement sqrt(CZ) gate
# TODO
 
  +
# Implement CCCNOT
   
 
=== Section 3 ===
 
=== Section 3 ===
Line 253: Line 265:
 
==== Section title: ====
 
==== Section title: ====
   
  +
Quantum data representation
S3
 
   
 
==== Topics covered in this section: ====
 
==== Topics covered in this section: ====
   
  +
* Quantum arithmetics
* TODO
 
  +
* Quantum RAM
  +
* Quantum vector encoding
  +
* Quantum matrix encoding
   
=== What forms of evaluation were used to test students’ performance in this section? ===
+
==== What forms of evaluation were used to test students’ performance in this section? ====
   
 
{|
 
{|
Line 292: Line 307:
 
=== Typical questions for ongoing performance evaluation within this section ===
 
=== Typical questions for ongoing performance evaluation within this section ===
   
  +
# Implement +3 for 2-s complement notation
# TODO
 
  +
# Encode a random vector of 8 components
  +
# Encode a random unitary matrix
   
 
==== Typical questions for seminar classes (labs) within this section ====
 
==== Typical questions for seminar classes (labs) within this section ====
   
  +
# Implement x2 for 2-s complement notation
# TODO
 
  +
# Encode a random vector of 4 components
  +
# Encode a random Hermitian matrix with density matrix
   
 
==== Test questions for final assessment in this section ====
 
==== Test questions for final assessment in this section ====
   
  +
# Implement x3 for 2-s complement notation
# TODO
 
  +
# Encode a random vector of 16 components
  +
# Encode a random Hermitian matrix
   
 
=== Section 4 ===
 
=== Section 4 ===
Line 306: Line 327:
 
==== Section title: ====
 
==== Section title: ====
   
  +
Quantum programming building blocks
S4
 
   
 
==== Topics covered in this section: ====
 
==== Topics covered in this section: ====
   
  +
* Quantum teleportation
* TODO
 
  +
* Amplitude amplification
  +
* QFT
  +
* Quantum Phase estimation
  +
* Grover's search algorithm
  +
* Shor's factorization algoritm
   
=== What forms of evaluation were used to test students’ performance in this section? ===
+
==== What forms of evaluation were used to test students’ performance in this section? ====
   
 
{|
 
{|
Line 343: Line 369:
 
|}
 
|}
   
=== Typical questions for ongoing performance evaluation within this section ===
+
==== Typical questions for ongoing performance evaluation within this section ====
  +
  +
# Teleport a qubit and prove your teleportation result is correct
  +
# Apply QFT to a given vector and report major frequency in discrete sinal
  +
# For a given matrix, implement a matrix as a circuit and find an eigenvalue for the first eigenvector
  +
  +
==== Typical questions for seminar classes (labs) within this section ====
  +
  +
# Implement Amplitude Amplification and show in works
  +
# Factorize 21 using Shor's algorithm
  +
# Apply QFT for a `sin(kt)` function
  +
  +
==== Test questions for final assessment in this section ====
  +
  +
# Factorize 15 using Shor's algorithm
  +
# Apply Grover search for an arbitrary oracle function
  +
# Apply QFT for a `cos(kt)` function
  +
  +
=== Section 5 ===
  +
  +
==== Section title: ====
  +
  +
Quantum optimization and machine learning
  +
  +
==== Topics covered in this section: ====
  +
  +
* Quantum PCA
  +
* Quantum SVM
  +
* Quadractic Unconstrained Binary Optimization (QUBO) and derivations
  +
* QAOA
  +
* Quantum CNN
  +
  +
==== What forms of evaluation were used to test students’ performance in this section? ====
  +
  +
{|
  +
!align="center"|
  +
!align="center"| '''Yes/No'''
  +
|-
  +
|align="center"| Development of individual parts of software product code
  +
|align="center"| 1
  +
|-
  +
|align="center"| Homework and group projects
  +
|align="center"| 1
  +
|-
  +
|align="center"| Midterm evaluation
  +
|align="center"| 0
  +
|-
  +
|align="center"| Testing (written or computer based)
  +
|align="center"| 0
  +
|-
  +
|align="center"| Reports
  +
|align="center"| 0
  +
|-
  +
|align="center"| Essays
  +
|align="center"| 0
  +
|-
  +
|align="center"| Oral polls
  +
|align="center"| 0
  +
|-
  +
|align="center"| Discussions
  +
|align="center"| 0
  +
|}
  +
  +
==== Typical questions for ongoing performance evaluation within this section ====
   
  +
# Using qiskit find the first principal conponent of the matrix
# TODO
 
  +
# Classify the data using quantum SVM
  +
# Implement Quantum CNN
   
 
==== Typical questions for seminar classes (labs) within this section ====
 
==== Typical questions for seminar classes (labs) within this section ====
   
  +
# Build a QSVM classifier
# TODO
 
  +
# State a problem in a QUBO form and solve it
   
 
==== Test questions for final assessment in this section ====
 
==== Test questions for final assessment in this section ====
   
  +
# Using qiskit find the second principal conponent of the matrix
# TODO
 
  +
# Find graph max cut using QAOA

Latest revision as of 11:03, 12 October 2021

Introduction to Quantum Programming

  • Course name: Introduction to Quantum Programming
  • Course number: N/A

Course Characteristics

What subject area does your course (discipline) belong to?

Quantum computing

Key concepts of the class

  • Quantum computer
  • Quantum circuit
  • Quantum optimization

What is the purpose of this course?

The goal of the course is to equip students with the skills to develop quantum algorithms using modern development tools for simulators and real computing systems. These skills include, but are not limited to, the qiskit programming language and its libraries, and universal quantum notation.

After mastering the course the student should be aware of ways to develop quantum algorithms, should be able to develop simple quantum circuits from scratch and integrate them into classical software, should be able to compose sequences of quantum circuits that solve computational and machine learning problems.

Course objectives based on Bloom’s taxonomy

- What should a student remember at the end of the course?

By the end of the course, the students should be able to remember and recognize

  • basics of quantum computing
  • definition of quantum state and quantum gate
  • basic quantum gates
  • basic quantum subprograms

- What should a student be able to understand at the end of the course?

By the end of the course, the students should be able to describe and explain

  • terms of quantum computing
  • solving applied problems in quantum computer

- What should a student be able to apply at the end of the course?

By the end of the course, the students should be able to

  • write an algormithm in qiskit progamming language
  • run an algorithm in simulator
  • run an algorithm in real quantum computer

Course evaluation

Course grade breakdown
Proposed points
Labs/seminar classes 0
Interim performance assessment 20
Assessments 60
Exams 20

If necessary, please indicate freely your course’s features in terms of students’ performance assessment:

Students pass 3 homeworks 20 points each. 20 points are given for in-class performance (solving the labs and whiteboard examples). 20 points go to the exam.

Grades range

Course grading range
Proposed range
A. Excellent 80-100
B. Good 65-79
C. Satisfactory 50-64
D. Poor 0-49

Resources and reference material

Main textbook:

Other reference material:

Course Sections

The main sections of the course and approximate hour distribution between them is as follows:

Course Sections
Section Section Title Teaching Hours
1 Single qubit 12
2 2 qubit operations 8
3 quantum data representation 10
4 quantum building blocks 4
5 quantum optimization and machine learning 6

Section 1

Section title:

Single Qubit

Topics covered in this section:

  • Qubit
  • Superposition
  • Quantum states, vector representation, and bra-ket notation
  • Single qubit gates NOT, READ/WRITE, HADAMARD, ROT, PHASE

What forms of evaluation were used to test students’ performance in this section?

Yes/No
Development of individual parts of software product code 1
Homework and group projects 1
Midterm evaluation 0
Testing (written or computer based) 0
Reports 0
Essays 1
Oral polls 0
Discussions 0

Typical questions for ongoing performance evaluation within this section

  1. Express a superposed state with given probabilities of realization in bra-ket notation
  2. Compute the state given a sequence of gates
  3. Prepare a desired quantum state given single-qubit operations
  4. What is the difference between Unitary and Stochastic matrices?

Typical questions for seminar classes (labs) within this section

  1. Prepare a desired state given single-qubit operations
  2. Apply Hadamard gate to |+>
  3. What is Matrix exponentiation?

Test questions for final assessment in this section

  1. Find eigenstates of Hadamard operator
  2. Prepare a desired quantum state

Section 2

Section title:

2 qubit operations

Topics covered in this section:

  • 2-qubit operations
  • CNOT
  • CU: CPHASE, CZ, SWAP
  • CC-U: Toffoli
  • Implementation of arbitrary C-U and CC-U gates


What forms of evaluation were used to test students’ performance in this section?

Yes/No
Development of individual parts of software product code 1
Homework and group projects 1
Midterm evaluation 0
Testing (written or computer based) 0
Reports 0
Essays 0
Oral polls 0
Discussions 0

Typical questions for ongoing performance evaluation within this section

  1. Compute tensor product of 2 matrices
  2. Implement C-RotX(phi) gate
  3. Compute CNOT^(-1)

Typical questions for seminar classes (labs) within this section

  1. Apply CNOT to |+0> in matrix form
  2. Implement CC-H gate using 2-qubit gates only
  3. Compute CCNOT^(-1)

Test questions for final assessment in this section

  1. Implement CZ gate
  2. Implement sqrt(CZ) gate
  3. Implement CCCNOT

Section 3

Section title:

Quantum data representation

Topics covered in this section:

  • Quantum arithmetics
  • Quantum RAM
  • Quantum vector encoding
  • Quantum matrix encoding

What forms of evaluation were used to test students’ performance in this section?

Yes/No
Development of individual parts of software product code 1
Homework and group projects 1
Midterm evaluation 0
Testing (written or computer based) 0
Reports 0
Essays 0
Oral polls 0
Discussions 0

Typical questions for ongoing performance evaluation within this section

  1. Implement +3 for 2-s complement notation
  2. Encode a random vector of 8 components
  3. Encode a random unitary matrix

Typical questions for seminar classes (labs) within this section

  1. Implement x2 for 2-s complement notation
  2. Encode a random vector of 4 components
  3. Encode a random Hermitian matrix with density matrix

Test questions for final assessment in this section

  1. Implement x3 for 2-s complement notation
  2. Encode a random vector of 16 components
  3. Encode a random Hermitian matrix

Section 4

Section title:

Quantum programming building blocks

Topics covered in this section:

  • Quantum teleportation
  • Amplitude amplification
  • QFT
  • Quantum Phase estimation
  • Grover's search algorithm
  • Shor's factorization algoritm

What forms of evaluation were used to test students’ performance in this section?

Yes/No
Development of individual parts of software product code 1
Homework and group projects 1
Midterm evaluation 0
Testing (written or computer based) 0
Reports 0
Essays 0
Oral polls 0
Discussions 0

Typical questions for ongoing performance evaluation within this section

  1. Teleport a qubit and prove your teleportation result is correct
  2. Apply QFT to a given vector and report major frequency in discrete sinal
  3. For a given matrix, implement a matrix as a circuit and find an eigenvalue for the first eigenvector

Typical questions for seminar classes (labs) within this section

  1. Implement Amplitude Amplification and show in works
  2. Factorize 21 using Shor's algorithm
  3. Apply QFT for a `sin(kt)` function

Test questions for final assessment in this section

  1. Factorize 15 using Shor's algorithm
  2. Apply Grover search for an arbitrary oracle function
  3. Apply QFT for a `cos(kt)` function

Section 5

Section title:

Quantum optimization and machine learning

Topics covered in this section:

  • Quantum PCA
  • Quantum SVM
  • Quadractic Unconstrained Binary Optimization (QUBO) and derivations
  • QAOA
  • Quantum CNN

What forms of evaluation were used to test students’ performance in this section?

Yes/No
Development of individual parts of software product code 1
Homework and group projects 1
Midterm evaluation 0
Testing (written or computer based) 0
Reports 0
Essays 0
Oral polls 0
Discussions 0

Typical questions for ongoing performance evaluation within this section

  1. Using qiskit find the first principal conponent of the matrix
  2. Classify the data using quantum SVM
  3. Implement Quantum CNN

Typical questions for seminar classes (labs) within this section

  1. Build a QSVM classifier
  2. State a problem in a QUBO form and solve it

Test questions for final assessment in this section

  1. Using qiskit find the second principal conponent of the matrix
  2. Find graph max cut using QAOA