Introduction To Qiskit 7
Introduction To Qiskit 7
with Qiskit
Qubits, Quantum Gate and Measurement
• A quantum computation is a collection of three elements
A quantum register or a set of quantum register.
A unitary matrix, which is used to execute a given quantum algorithm.
Measurement to extract information we need.
• Entanglement
Two systems are in a special case of quantum mechanical superposition
called entanglement if the measurement of one system is correlated with
the state of the other system in a way that is stronger than correlations
in the classical world.
Source: https://qiskit.org/textbook/ch-states/introduction.html
Quantum Gates
• Quantum Operators
• In gate-based quantum computers, these operator used to evolve the state.
• Unitary and reversable.
• Single qubit gate: rotation in block sphere.
Also, this show the difference between entangle and separate state
Reference: https://qiskit.org/documentation/stubs/qiskit.circuit.QuantumCircuit.html#qiskit.circuit.QuantumCircuit
Qiskit Circuit Example
Quantum Computing Stack
Source: Gambetta, J.M., Chow, J.M. & Steffen, M. Building logical qubits in a superconducting quantum computing system. npj Quantum Inf 3, 2 (2017).
Qiskit Overview
The Qiskit Elements
Terra, the ‘earth’ element, is the foundation on
which the rest of the software lies.
Source: https://qiskit.org/documentation/the_elements.html
Different Simulator
Qiskit Code Example
Real QC
Installation
• Anaconda (highly recommended for learning)
• pip install qiskit
• This is CS course.
Reference: https://qiskit.org/documentation/install.html#install
The Deutsch Algorithm
• The first to demonstrate quantum over classical computing.
Deutsch Problem:
Given a black box that implement some Boolean function 𝑓: 0,1 → {0,1}.
We are promised that the function is either constant or balanced.
constant balanced
𝑓 is Boolean function.
Addition module 2
Phase Kick Back
• Useful trick in many quantum algorithm.
Consider Quantum Black box function 𝑓
The Deutsch Algorithm
Qiskit Example
constant
balanced
output = 0
output = 1
Extension : The Deutsch-Jozsa algorithm
• This time the function 𝑓 is a function from n bits string to a bit.
The Deutsch-Jozsa algorithm
Summary
Qiskit Example
Improvement?
2𝑛
• The worst case in classical take us +1
2
• In quantum we need only one query ….. But, if there exist error ?