Difference between revisions of "BSTE:IntroductionToQuantumProgramming"

From IU
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 143: Line 143:
 
==== Topics covered in this section: ====
 
==== Topics covered in this section: ====
   
  +
* Qubit
* Кубит, суперпозиция и квантовые состояния, однокубитные операции, кубит, вектор квантового состояния, кет-нотация, однокубитные гейты NOT, READ, WRITE, HADAMARD, ROT, PHASE
 
  +
* 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 179: Line 181:
 
==== 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 205:
 
==== Topics covered in this section: ====
 
==== Topics covered in this section: ====
   
  +
* 2-qubit operations
* многокубитные операции CNOT, Toffoli, CPHASE, CZ, SWAP
 
  +
* CNOT
  +
* CU: CPHASE, CZ, SWAP
  +
* CC-U: Toffoli
  +
* Implementation of arbitrary C-U and CC-U gates
   
   
Line 234: Line 245:
 
==== 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 254: Line 269:
 
==== 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 289: 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 307: Line 331:
 
==== 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 342: Line 371:
 
==== 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
# TODO
 
  +
# 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 ====
 
==== Typical questions for seminar classes (labs) within this section ====
   
  +
# Implement Amplitude Amplification and show in works
# TODO
 
  +
# Factorize 21 using Shor's algorithm
  +
# Apply QFT for a `sin(kt)` function
   
 
==== Test questions for final assessment in this section ====
 
==== Test questions for final assessment in this section ====
   
  +
# Factorize 15 using Shor's algorithm
# TODO
 
  +
# Apply Grover search for an arbitrary oracle function
  +
# Apply QFT for a `cos(kt)` function
   
 
=== Section 5 ===
 
=== Section 5 ===
Line 360: Line 395:
 
==== Topics covered in this section: ====
 
==== Topics covered in this section: ====
   
  +
* Quantum PCA
* TODO
 
  +
* 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? ====
 
==== What forms of evaluation were used to test students’ performance in this section? ====
Line 395: Line 434:
 
==== Typical questions for ongoing performance evaluation within this section ====
 
==== 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