Quantum computing provides an alternative computational model based on quantum mechanics. It utilizes quantum phenomena such as superposition and entanglement to perform computations using quantum logic gates on qubits. This allows quantum computers to potentially solve certain problems exponentially faster than classical computers. However, building large-scale quantum computers remains a challenge. In the meantime, smaller quantum systems are being developed and quantum algorithms are being experimentally tested on these devices. Researchers are also working on methods to efficiently simulate quantum computations on classical computers.
1. Fundamentals of
Quantum Computing
Prof. Amlan Chakrabarti
Dean Faculty of Engineering and Technology
Director, A.K.Choudhury School of Information Technology
University of Calcutta
email: acakcs@caluniv.ac.in
Quantum Computing Knowledge Workshop, 12th
October 2018: Dept. of IT&E, Govt. of W.B.
2. Realizations are getting smaller (and faster) and reaching a point where
“classical” physics is no longer a sufficient model for the laws of physics
2
3. 3
MooreMoore’s Law’s Law
Courtesy:Quantum Computing and Communications- An Engineering
approach: Sandor Imre and Ferenc Balazs
Moore’s Law: the amount of information storable on a given amount of silicon has
roughly doubled every 18 months. At ~ 10nm. scale quantum effects will upset the
classical progression of Moore’s law..
4. 4
The Need of the ChangeThe Need of the Change
• The closer we are to the few-electron transistor disturbingThe closer we are to the few-electron transistor disturbing
quantum effects will appear more often and strongerquantum effects will appear more often and stronger
• Either we manage to find a new way of miniaturization or weEither we manage to find a new way of miniaturization or we
have to learn how to exploit the difficulties and strangeness ofhave to learn how to exploit the difficulties and strangeness of
quantum mechanicsquantum mechanics
• FeynmanFeynman’s Suggestion:’s Suggestion:
– Instead of regarding computers as devices working under theInstead of regarding computers as devices working under the
laws of classical physics which is common sense , let uslaws of classical physics which is common sense , let us
consider their operation as a special case of a more generalconsider their operation as a special case of a more general
theory governed by quantum mechanics.theory governed by quantum mechanics.
5. 5
Requirement of NewRequirement of New
Computational strategiesComputational strategies
• The way becomes open for the development of quantum hardware
• We have to study quantum mechanics from a computer science point of
view
• These software-related efforts are comprehended by quantum computing
• Top experts have experimentally validated quantum computing algorithms
which overcome the classical competitors
• Once we familiarized ourselves with quantum-faced computing why keep
communications away from the new chances
6. 6
WhyWhy Quantum Computing?Quantum Computing?
• It is,It is, apparentlyapparently, exponentially more time-, exponentially more time-
efficient thanefficient than any possibleany possible classical computingclassical computing
scheme at solvingscheme at solving somesome problems:problems:
– Factoring, discrete logarithms, related problemsFactoring, discrete logarithms, related problems
– Simulating quantum physical systems accuratelySimulating quantum physical systems accurately
• This application was the original motivation for quantumThis application was the original motivation for quantum
computing research first suggested by famous physicistcomputing research first suggested by famous physicist
Richard Feynman in the early 80Richard Feynman in the early 80’s’s
7. Quantum Computation
• A computation model based on quantum principles of
physics
• Ability to enter many parallel “states” and use
interference to recover important information
• Transformations must be unitary
8. Why Is This Helpful?
• Multiple computations simultaneously
• Computing power is exponential
11. Quantum Computing: Thrust Areas
● Quantum Technology
● Quantum Algorithms
● Quantum Modelling and Simulation
● Quantum Communication and Cryptography
11
12. 12
Status of Quantum ComputingStatus of Quantum Computing
• Computing giants Google and Microsoft recently hired a host of leading lights, and
have set challenging goals in QC (Nature news 2017)
• D-Wave 2000Q – the firm’s first 2,000 quantum bit (qubit) quantum computer
came to existence in 2017
– The quantum 2000Q is capable of outperforming “classical servers” by factors
of between 1,000 and 10,000
– IBM established a landmark in computing Friday, announcing a quantum
computer that handles 50 quantum bits, or qubits
– The company is also making a 20-qubit system available through its cloud
computing platform
– Scaling up to hundreds or thousands of quantum bits becomes a possibility
• Quantum Communication
– Teleportation, Entanglement and Zeno Effect has been successfully
implemented and tested
• Quantum Cryptography
– Quantum Key Exchange Protocols, BB84 etc.
• Quantum Machine Learning
– Quantum Clustering, Quantum Random Walk Algorithms for Heuristic Search
13. • Qubit vs. Bit:
Bit (Classical) degree of freedom that can take
only two possible values.
– Qubit
• Quantum observable whose spectrum contains two values
{0,1}.
• Minimal quantum physical system.
• The boolean observable of a qbit system is called a sharp
observable , as it can have only values 0 and 1.
• A qubit can have another observable which has an equal
probability of 1 and 0, individual probabilities summed will
results to unity.
• Qubit in reality:
– Electron spin (up or down)
– Photon polarization (horizontal/vertical)
– Spin of atomic nucleus
– Current in a super conducting loop
– Presence/absence of a particle
13
14. Quantum Phenomenon:
Superposition and Entanglement
● Superposition
○ Superposition is the ability of a quantum system to be in multiple
states at the same time.
● Entanglement
○ Multiple particles are associated in such a way that measurement
of one quantum state of one particle is determined by the
measurement of the state of another particle.
14
15. Computation with QubitsComputation with Qubits
How does the use of qubits affect computation?
Classical Computation
Data unit: bit
x = 0 x = 1
0
1
0
1
Valid states:
x = ‘0’ or ‘1’ |ψ〉 = c1|0〉 + c2|1〉
Quantum Computation
Data unit: qubit
Valid states:
|ψ〉 = |0〉 |ψ〉 = |1〉 |ψ〉 = (|0〉 + |1〉)/√2
=|1〉 =|0〉= ‘1’ = ‘0’
15
17. 17
Quantum Logic NetworksQuantum Logic Networks
• Invented by Deutsch (1989)Invented by Deutsch (1989)
– Analogous to classical Boolean logic networksAnalogous to classical Boolean logic networks
– Generalization of Fredkin-Toffoli reversible logic circuitsGeneralization of Fredkin-Toffoli reversible logic circuits
• System is divided into individual bits, orSystem is divided into individual bits, or qubitsqubits
– 2 orthogonal states of each qubit are designated as the2 orthogonal states of each qubit are designated as the
computationalcomputational basis statesbasis states,, “0” and “1”“0” and “1”
• Quantum logic gates:Quantum logic gates:
– Local unitary transforms that operate on only a few state bitsLocal unitary transforms that operate on only a few state bits
at a timeat a time
• Computation via predetermined sequence of gate applications toComputation via predetermined sequence of gate applications to
selected bitsselected bits
18. 18
Quantum Gates: NOTQuantum Gates: NOT
• All classical input-consuming reversible gates can beAll classical input-consuming reversible gates can be
represented as unitary transformations!represented as unitary transformations!
• E.g.E.g., input-consuming NOT gate (inverter), input-consuming NOT gate (inverter)
in out
in out
in out
0 1
1 0
1
0
10
≡
01
10:N 01
10
=
=
N
N
1
01
1
00
≡
≡
1
0:
0
1:
19. 19
Controlled-NOTControlled-NOT
• A.k.a. CNOT (or input-consuming XOR)A.k.a. CNOT (or input-consuming XOR)
A A’
B B’ = A⊕B
A A’
B
B’ = A⊕B
A B A’ B’
0 0 0 0
0 1 0 1
1 0 1 1
1 1 1 0
11
10
01
00
11100100
≡
0100
1000
0010
0001
:X 1110 =X
Example:
A B A B
Jadavpur University November 28, 2016
20. 20
Toffoli Gate (CCNOT)Toffoli Gate (CCNOT)
A B C A’ B’ C’
0 0 0 0 0 0
0 0 1 0 0 1
0 1 0 0 1 0
0 1 1 0 1 1
1 0 0 1 0 0
1 0 1 1 0 1
1 1 0 1 1 0
1 1 1 1 1 1
(XOR)
A
B
C
A’=A
B’=B
C’ = C⊕AB
A
B’B
C
A’
C’
111
110
101
100
011
010
001
000
111110101100011010001000
≡
01000000
10000000
00100000
00010000
00001000
00000100
00000010
00000001
:X Now, what happens if
the unitary matrix elements
are not always 0 or 1?
21. 21
The Hadamard TransformThe Hadamard Transform
• A randomizingA randomizing “square root of identity” gate.“square root of identity” gate.
• Used frequently in quantum logic networks.Used frequently in quantum logic networks.
1
0
10
−
≡
2
1
2
1
2
1
2
1
:H
==
10
01
2
2
IH
22. 22
• Quantum Logic CircuitsQuantum Logic Circuits
– Circuit behavior is governed explicitly by quantumCircuit behavior is governed explicitly by quantum
mechanicsmechanics
– Signal states are vectors interpreted as a superposition ofSignal states are vectors interpreted as a superposition of
binary “binary “qubitqubit”” vectors with complex-number coefficientsvectors with complex-number coefficients
– Operations are defined by linear algebra over Hilbert SpaceOperations are defined by linear algebra over Hilbert Space
and can be represented by unitary matrices with complexand can be represented by unitary matrices with complex
elementselements
– Severe restrictions exist on copying and measuring signalsSevere restrictions exist on copying and measuring signals
– Many universal gate sets exist but the best types are notMany universal gate sets exist but the best types are not
obviousobvious
Ψ = ci in −1in−1…i0
i = 0
2n
−1
∑
23. 23
• Unitary OperationsUnitary Operations
– Gates and circuits must be reversible (information-Gates and circuits must be reversible (information-
lossless)lossless)
• Number of output signal lines = Number of input signal linesNumber of output signal lines = Number of input signal lines
• The circuit function must be a bijection, implying that outputThe circuit function must be a bijection, implying that output
vectors are a permutation of the input vectorsvectors are a permutation of the input vectors
– Classical logic behavior can be represented byClassical logic behavior can be represented by
permutation matricespermutation matrices
– Non-classical logic behavior can be representedNon-classical logic behavior can be represented
including state sign (phase) and entanglementincluding state sign (phase) and entanglement
Quantum Circuit CharacteristicsQuantum Circuit Characteristics
24. 1/√21/√2
00
1/√21/√2
00
11
00
00
00
N
CNOT
|0〉 + |1〉
|0〉
Example Circuit
√2
______
1/√21/√2
00
1/√21/√2
00
1/√21/√2
00
00
1/√21/√2
00
00
00
11
|0〉 + |1〉
|0〉
√2
______
‘0’
‘0’
or
‘1’
‘1’
or
50% 50%
Separable state:
can be written as
tensor product
|Ψ〉 = |φ〉 ⊗ |χ〉
Entangled state:
cannot be written
as tensor product
|Ψ〉 ≠ |φ〉 ⊗ |χ〉
?
?
24
25. Some Interesting ConsequencesSome Interesting Consequences
No cloning theorem
It is impossible to exactly copy an unknown quantum state
|ψ〉
|0〉
|ψ〉
|ψ〉
Reversibility
Since quantum mechanics is reversible (dynamics are unitary),
quantum computation is reversible.
|00000000〉 |ψφβπµψ〉 |00000000〉
U.U†
= I
25
26. Grover’s Search Algorithm
The best a classical computer
can do on average is N/2 queries.
1 Oracle
No
...
2 Oracle
No
3 Oracle
Yes
Classical computer
Oracle
1+2+3+... No+No+Yes+No+...
Quantum computer
Using Grover’s algorithm, a quantum computer
can find the answer in √N queries!
Superposition over all N possible inputs.
27. Quantum Cryptography
● Provides for secure key exchange over physically
unprotected channels w. a guarantee of detection of any
eavesdropping of the key
● Physically impossible to compromise security (except @
endpoints) barring overthrow of physics!
● Probably secure under known laws
Experimentally verified to work perfectly over >48 km
distances (so far) (Hughes ‘99) via fiber-optic networks
27
28. 28
Typical Implementation MethodTypical Implementation Method
• AnyAny “flying qubit” will do.“flying qubit” will do.
– Most common method uses polarized photons.Most common method uses polarized photons.
(Bennett & Brassard(Bennett & Brassard ‘84)‘84)
θ
Arbitrarychoice
ofbasis:
“0”
“1”
↔+= θθ cossin
Diffraction grating
w. vertical slits
θ + π/4
“0”
“1”
)cos()sin( 44
ππ θθ +++=
Diffraction grating
w. diagonal slits
31. 31
Efficient QC SimulationsEfficient QC Simulations
• Task: Simulate anTask: Simulate an nn-qubit quantum computer.-qubit quantum computer.
• Maximally stupid approach:Maximally stupid approach:
– Store a 2Store a 2nn
-element vector-element vector
– Multiply it by a full 2Multiply it by a full 2nn
××22nn
matrix for each gate opmatrix for each gate op
• Some obvious optimizations:Some obvious optimizations:
– Never store whole matrix (compute dynamically)Never store whole matrix (compute dynamically)
– Store only nonzero elements of state vectorStore only nonzero elements of state vector
• Especially helpful when qubits are highly correlatedEspecially helpful when qubits are highly correlated
– Do only constant work per nonzero vector elementDo only constant work per nonzero vector element
• Scatter amplitude from each state to 1 or 2 successorsScatter amplitude from each state to 1 or 2 successors
– Drop small-probability-mass sets of statesDrop small-probability-mass sets of states
• Linearity of QM implies no chaotic growth of errorsLinearity of QM implies no chaotic growth of errors
32. 32
Simulating Quantum Computations
• Given:Given:
– AnyAny nn-qubit quantum computation, expressed as a-qubit quantum computation, expressed as a
sequence of 1-qubit gates and CNOT gates.sequence of 1-qubit gates and CNOT gates.
– An initial stateAn initial state ss00 which is just a basis state in thewhich is just a basis state in the
classical bitwise basis,classical bitwise basis, e.g.e.g. ||0000000000〉〉..
• Goal:Goal:
– Generate a final basis state stochastically with the sameGenerate a final basis state stochastically with the same
probability distribution as the quantum computer wouldprobability distribution as the quantum computer would
do.do.
U1
U3
U4
U2
33. 33
Matrix RepresentationMatrix Representation
• Consider each gate as rank-2Consider each gate as rank-2nn
unitary matrix:unitary matrix:
– Each CNOT application is a 0-1 (permutation)Each CNOT application is a 0-1 (permutation)
matrix - a classical reversible bit-operation.matrix - a classical reversible bit-operation.
– With appropriate row ordering, eachWith appropriate row ordering, each UUii gategate
application is block-diagonal, w. each 2×2 blockapplication is block-diagonal, w. each 2×2 block
equal toequal to UUii..
– We need never represent these full matrices!We need never represent these full matrices!
– The 1 or 2 nonzero entries in a given row can beThe 1 or 2 nonzero entries in a given row can be
located & computed immediately given the row idlocated & computed immediately given the row id
(bit string) and(bit string) and UUii..
36. QCADQCAD
• Motivation
– Circuit Synthesis for Quantum Algorithms
– Development of Quantum Module library (Technology Independent)
– Physical Machine Description (PMD) specific optimization and cost
estimation
– PMD specific cell library creation (Technology Dependent)
– Considering issues of FT-QC and Error coding
• Challenges
– Integration of Classical (Reversible) and Quantum Modules
– Handling larger circuit size in terms of qubits
– Appropriate Cost Estimation
– Optimization Issues
– Functional Verification
37. Quantum Algorithm DescriptionQuantum Algorithm Description
using QCLusing QCL
• QCL (Quantum Computation Language) is a high level, architecture independent
programming language for quantum computers (Omer,
http://tph.tuwien.ac.at/~oemer/qcl.html)
• Its syntax is similar to C programming language
• Both classical and quantum code can be combined in the same program
Quantum
Algorithm
in QCL
Input
State
Output
State
Quantum Algorithm Simulation
40. Automated Generation of QASMAutomated Generation of QASM
for Quantum & Reversiblefor Quantum & Reversible
ModulesModules
• Quantum & Reversible modulesQuantum & Reversible modules
considered at presentconsidered at present
– QFT/IQFTQFT/IQFT
– Bernstein-Vazirani Search (BVS)Bernstein-Vazirani Search (BVS)
– GroverGrover’s search’s search
– Arithmetic CircuitsArithmetic Circuits
• DraperDraper’s Adder’s Adder
• CuccaroCuccaro’s adder’s adder
• 4 qubit multiplier4 qubit multiplier
• modular adder (a+b)%Nmodular adder (a+b)%N
• modular subtractormodular subtractor
• Constant modular multiplierConstant modular multiplier
• Modular exponentiationModular exponentiation
Algorithm for generation of QFT Circuit
CC Lin, A. Chakrabarti and N.K.Jha, “QLib: Quantum Module Library”, ACM JETC 2014
41. PMD specific Synthesis
• Each PMD supports a set of primitive quantum operationsEach PMD supports a set of primitive quantum operations
• Quantum gate Library :Quantum gate Library : Rx(θ), Ry(θ), Rz(Rx(θ), Ry(θ), Rz(θ),θ), H, CNOT, CZ, ZENO, SWAP, CP(H, CNOT, CZ, ZENO, SWAP, CP(θ),θ), G(G(θ),θ), iSW (iSW (θ),θ), Toffoli,Toffoli,
Fredkin, and PeresFredkin, and Peres
• Gate implementations are optimized by identity rules, involving both one qubit andGate implementations are optimized by identity rules, involving both one qubit and
two-qubit operationstwo-qubit operations
PMD One-qubit operations Two-qbit
operations
QD Rx, Rz, σx, σz, S, T CZ
SC Rx, Ry, Rz, iSWAP, CP
IT Rxy, Rz, G
NA Rxy CZ
LP Rx, Ry, Rz, σx, σy, σz, S, T, H CNOT, CZ,
SWAP, ZENO
NP Asqu, Rx, Ry, Rz, H CNOT
43. Quantum CompilerQuantum Compiler
• SKA and STA can only compile one-qubit gatesSKA and STA can only compile one-qubit gates
• Conversion of non-FT two-qubit gates to FT two-qubit gates first and then all theConversion of non-FT two-qubit gates to FT two-qubit gates first and then all the
non-FT one-qubit gates to FT cascadesnon-FT one-qubit gates to FT cascades
Synthesis flow of non-FT one-qubit gates based on the FT table
CC Lin, A. Chakrabarti and N.K.Jha, “FTQLS: Fault-Tolerant Quantum Logic Synthesis”, IEEE TVLSI 2013
46. 46
Research work at School of I.T., CUResearch work at School of I.T., CU
• The present research activities in the area of quantum computing are as
follows :
– Quantum Machine Learning
– Designing of new quantum circuits for quantum algorithms
– New circuit optimization techniques
• Template based
• Heuristic based
– Development of CAD tools for quantum circuit design, optimization and
simulations
– Quantum Cryptography Multi-valued logic and quantum computing
• International Collaborations
– Department of Computer Engineering, Princeton University, USA
– Dept. of Computer Science & Engineering and Department of Physics, New
York State University at Buffalo, USA
– Iwate Prefecture University, Japan
– University of Bremen, Germany
– University Linz, Austria
– Nanyang Technological University, Singapore
47. Our Publications (Selected List)Our Publications (Selected List)
• K. Regan,K. Regan, A. ChakrabartiA. Chakrabarti, C. Guan, “Algebraic and Logical Emulations of Quantum Circuits”, C. Guan, “Algebraic and Logical Emulations of Quantum Circuits” Springer Trans. ComputationalSpringer Trans. Computational
ScienceScience 31: 41-76 (2018).31: 41-76 (2018).
• M. GhoshM. Ghosh, A. Chakrabarti, A. Chakrabarti, Niraj K. Jha, “Automated Quantum Circuit Synthesis and Cost Estimation for the Binary Welded Tree, Niraj K. Jha, “Automated Quantum Circuit Synthesis and Cost Estimation for the Binary Welded Tree
Oracle”Oracle” ACM Journal on Emerging Technologies in Computing Systems (JETC)ACM Journal on Emerging Technologies in Computing Systems (JETC)13(4): 51:1-51:14 (2017).13(4): 51:1-51:14 (2017).
• S. Guha Roy andS. Guha Roy and A. ChakrabartiA. Chakrabarti,, “Novel Graph Clustering Algorithm Based On Discrete Time Quantum Random Walk,” Book“Novel Graph Clustering Algorithm Based On Discrete Time Quantum Random Walk,” Book
Titled: Quantum Inspired Computational Intelligence: Research and Applications ,Titled: Quantum Inspired Computational Intelligence: Research and Applications , Morgan KaufmannMorgan Kaufmann 2017.2017.
• S. Basu, S. B. Mandal,S. Basu, S. B. Mandal, A. ChakrabartiA. Chakrabarti and Susmita Sur-Kolay, "An Efficient Synthesis Method for Ternary Reversible Logic",and Susmita Sur-Kolay, "An Efficient Synthesis Method for Ternary Reversible Logic",
Proc. of IEEE International Symposium on Circuits and Systems 2016 (ISCAS 2016)Proc. of IEEE International Symposium on Circuits and Systems 2016 (ISCAS 2016)..
• P.Niemann, S. Basu,P.Niemann, S. Basu, A. ChakrabartiA. Chakrabarti, Niraj K. Jha and Robert Wille, "Synthesis of Quantum Circuits for Dedicated Physical, Niraj K. Jha and Robert Wille, "Synthesis of Quantum Circuits for Dedicated Physical
Machine Descriptions,Machine Descriptions,"" Proc.of 7th Conference on Reversible ComputationProc.of 7th Conference on Reversible Computation ((RC 2015RC 2015))..
• S.B.Mondal,S.B.Mondal, A.Chakrabarti,A.Chakrabarti, and S.Sur-Kolay,and S.Sur-Kolay, “Quantum Ternary Circuit Synthesis Using Projection Operations,”“Quantum Ternary Circuit Synthesis Using Projection Operations,” Journal ofJournal of
Multiple-Valued Logic and Soft ComputingMultiple-Valued Logic and Soft Computing, Vol 21, Issue 1-4, pp. 73-92, January 2015., Vol 21, Issue 1-4, pp. 73-92, January 2015.
• C.C. Lin,C.C. Lin, A. ChakrabartiA. Chakrabarti, N. K. Jha,, N. K. Jha, “QLib: Quantum module library,”“QLib: Quantum module library,” ACM Journal on Emerging Technologies in ComputingACM Journal on Emerging Technologies in Computing
Systems (JETC)Systems (JETC), V. 11 Issue 1, Article No. 7, September 2014., V. 11 Issue 1, Article No. 7, September 2014.
• CC Lin,CC Lin, A. ChakrabartiA. Chakrabarti and N.K.Jha,and N.K.Jha, ““FTQLS: Fault-Tolerant Quantum Logic Synthesis,”““FTQLS: Fault-Tolerant Quantum Logic Synthesis,” IEEE Transactions on Very LargeIEEE Transactions on Very Large
Scale Integration (VLSI) SystemsScale Integration (VLSI) Systems, Vol. 22,No.6, pp. 1350-1363, June 2014., Vol. 22,No.6, pp. 1350-1363, June 2014.
• S.B.Mondal,S.B.Mondal, A.ChakrabartiA.Chakrabarti and S.Sur-Kolay,and S.Sur-Kolay, “Synthesis of Ternary Grover's Algorithm”“Synthesis of Ternary Grover's Algorithm”, Proc. of IEEE 441st International, Proc. of IEEE 441st International
Symposium on Multiple-Valued Logic (ISMVL 2014Symposium on Multiple-Valued Logic (ISMVL 2014)), Bremen Germany, 19-21 May 2014., Bremen Germany, 19-21 May 2014.
• C.C. Lin,C.C. Lin, A. ChakrabartiA. Chakrabarti, N. K. Jha,, N. K. Jha, “Optimized Quantum Gate Library for Various Physical Machine Descriptions,”“Optimized Quantum Gate Library for Various Physical Machine Descriptions,” IEEEIEEE
Transactions on Very Large Scale Integration (VLSI) SystemsTransactions on Very Large Scale Integration (VLSI) Systems, Vol. 21, No.11, pp. 2055-2068, Nov. 2013., Vol. 21, No.11, pp. 2055-2068, Nov. 2013. 47