Difference between revisions of "BSTE:IntroductionToQuantumProgramming"
S.protasov (talk | contribs) |
S.protasov (talk | contribs) |
||
(14 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
=== Key concepts of the class === |
=== Key concepts of the class === |
||
+ | * Quantum computer |
||
− | * TODO |
||
+ | * Quantum circuit |
||
− | * TODO |
||
+ | * Quantum optimization |
||
=== What is the purpose of this course? === |
=== 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. |
||
− | TODO |
||
+ | |||
+ | 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 === |
=== Course objectives based on Bloom’s taxonomy === |
||
Line 25: | Line 28: | ||
By the end of the course, the students should be able to remember and recognize |
By the end of the course, the students should be able to remember and recognize |
||
+ | * basics of quantum computing |
||
− | * TODO |
||
+ | * 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? === |
=== - What should a student be able to understand at the end of the course? === |
||
Line 31: | Line 37: | ||
By the end of the course, the students should be able to describe and explain |
By the end of the course, the students should be able to describe and explain |
||
+ | * terms of quantum computing |
||
− | * TODO |
||
+ | * solving applied problems in quantum computer |
||
=== - What should a student be able to apply at the end of the course? === |
=== - What should a student be able to apply at the end of the course? === |
||
Line 37: | Line 44: | ||
By the end of the course, the students should be able to |
By the end of the course, the students should be able to |
||
+ | * write an algormithm in qiskit progamming language |
||
− | * TODO |
||
+ | * run an algorithm in simulator |
||
+ | * run an algorithm in real quantum computer |
||
=== Course evaluation === |
=== Course evaluation === |
||
Line 43: | 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"| |
+ | |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"| |
+ | |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 72: | 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"| |
+ | |align="center"| 65-79 |
− | |align="center"| 60-79 |
||
|- |
|- |
||
|align="center"| C. Satisfactory |
|align="center"| C. Satisfactory |
||
− | |align="center"| |
+ | |align="center"| 50-64 |
− | |align="center"| 40-59 |
||
|- |
|- |
||
|align="center"| D. Poor |
|align="center"| D. Poor |
||
− | |align="center"| 0- |
+ | |align="center"| 0-49 |
− | |align="center"| 0-39 |
||
|} |
|} |
||
Line 97: | 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 115: | 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"| |
+ | |align="center"| 8 |
|- |
|- |
||
|align="center"| 3 |
|align="center"| 3 |
||
+ | | quantum data representation |
||
− | | S3 |
||
− | |align="center"| |
+ | |align="center"| 10 |
|- |
|- |
||
|align="center"| 4 |
|align="center"| 4 |
||
+ | | quantum building blocks |
||
− | | S4 |
||
− | |align="center"| |
+ | |align="center"| 4 |
+ | |- |
||
+ | |align="center"| 5 |
||
+ | | quantum optimization and machine learning |
||
+ | |align="center"| 6 |
||
|} |
|} |
||
Line 135: | Line 139: | ||
==== Section title: ==== |
==== Section title: ==== |
||
+ | Single Qubit |
||
− | S1 |
||
− | === Topics covered in this section: === |
+ | ==== 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? === |
+ | ==== What forms of evaluation were used to test students’ performance in this section? ==== |
{| |
{| |
||
Line 172: | 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 189: | 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 226: | 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 244: | 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 283: | 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 297: | 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 334: | 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
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
Proposed range | |
---|---|
A. Excellent | 80-100 |
B. Good | 65-79 |
C. Satisfactory | 50-64 |
D. Poor | 0-49 |
Resources and reference material
Main textbook:
- Programming Quantum Computers: Essential Algorithms and Code Samples
- Qiskit textbook
- QBronze workshop materials
Other reference material:
Course Sections
The main sections of the course and approximate hour distribution between them is as follows:
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
- Express a superposed state with given probabilities of realization in bra-ket notation
- Compute the state given a sequence of gates
- 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
- Prepare a desired state given single-qubit operations
- Apply Hadamard gate to |+>
- What is Matrix exponentiation?
Test questions for final assessment in this section
- Find eigenstates of Hadamard operator
- 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
- Compute tensor product of 2 matrices
- Implement C-RotX(phi) gate
- Compute CNOT^(-1)
Typical questions for seminar classes (labs) within this section
- Apply CNOT to |+0> in matrix form
- Implement CC-H gate using 2-qubit gates only
- Compute CCNOT^(-1)
Test questions for final assessment in this section
- Implement CZ gate
- Implement sqrt(CZ) gate
- 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
- Implement +3 for 2-s complement notation
- Encode a random vector of 8 components
- Encode a random unitary matrix
Typical questions for seminar classes (labs) within this section
- Implement x2 for 2-s complement notation
- Encode a random vector of 4 components
- Encode a random Hermitian matrix with density matrix
Test questions for final assessment in this section
- Implement x3 for 2-s complement notation
- Encode a random vector of 16 components
- 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
- 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?
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
- Using qiskit find the first principal conponent of the matrix
- Classify the data using quantum SVM
- Implement Quantum CNN
Typical questions for seminar classes (labs) within this section
- Build a QSVM classifier
- State a problem in a QUBO form and solve it
Test questions for final assessment in this section
- Using qiskit find the second principal conponent of the matrix
- Find graph max cut using QAOA