SlideShare uma empresa Scribd logo
1 de 30
Baixar para ler offline
Quantum algorithms
on the QX Simulator
HiPEAC 2019, Valencia
Ir. Aritra Sarkar
Dr. Carmen G. Almudever
Prof. Dr. Koen Bertels
{A.Sarkar-3/C.GraciaAlmudever-1/K.L.M.Bertels}@tudelft.nl
Quantum Computer Architecture Lab
Delft University of Technology
2
Using a QC 101
• For this part of the Tutorial, assume
– You have a “big” quantum computer
– The qubits are “perfect”
• What would you do with it?
– https://math.nist.gov/
• How would you do it?
– Quantum Programming
• Circuit builder
• QASM
• High-level language
3
Conventions cheat sheet
 Circuits – LSQ on top
 String representation of state – LSQ on right
 Vector representation of state – LSQ increments before MSQ
 Multi-qubit operators
ۧ|𝑞0
ۧ|𝑞1
...
H
ۧ| … 𝑞1 𝑞0
𝑎 ۧ|00
𝑎 ۧ|01
𝑎 ۧ|10
𝑎 ۧ|11
𝐼 𝑞1
⊗ 𝐻 𝑞0
=
1
2
1 1 0 0
1 −1 0 0
0 0 1 1
0 0 1 −1
𝐶𝑁𝑂𝑇𝑐𝑡 = 𝐶𝑁𝑂𝑇𝑞0 𝑞1
=
1 0 0 0
0 0 0 1
0 0 1 0
0 1 0 0
𝐶𝑁𝑂𝑇𝑐𝑡 = 𝐶𝑁𝑂𝑇𝑞1 𝑞0
=
1 0 0 0
0 1 0 0
0 0 0 1
0 0 1 0
4
Necessary evil
a
2
b
2
• No-cloning theorem
– Qubits cannot be copied for QEC encoding
– Good for communication secrecy; bad for computing
• Participatory observer
– Measurement projects the superposition state probabilistically onto the basis states
• ۧ𝜓 = 𝛼 ۧ0 + 𝛽| ۧ1
• P +1 = 𝛼 2
• P −1 = 𝛽 2
– Non-unitary, non-reversible
– Fundamental indeterminacy, not measurement error!
– 1 measurement cannot reveal the initial state
• however, decides its final state
One can extract only the same amount of data from a quantum computer that one could from a classical computer of the same size
5
Classical computing
• NAND gate + FanOut = all logic for classical Boolean algebra
• How to do classical computing with just 1 quantum gate?
– The Toffoli gate (a.k.a. CC-NOT; CCX)
• 2 control bits flip the target when both are high
• NAND: CCX = xy1, FanOut: CCX = 1x0
• How about an adder?
FANOUT
cba y
000 0
001 1
010 0
011 1
100 0
101 1
110 1
111 0
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 1
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0
6
Dissecting a quantum algorithm
Superpose
Soln. Space
Encode
Function
Clever
Process
Measure
Initialize
|0ۧ⊗n
Classical
Output
Classical
Input
1. Prepare all-zero state for n-qubits (not so trivial experimentally as it sounds)
2. Full superposition in computational basis (H-gate on all qubits)
– OR, superposition of classical input space
3. Transform superposition to evaluate the function (using 1 & 2 qubit gates)
– OR, evaluate function based on classical input space
4. Somehow* increase the amplitude of the solution space
5. Measure out the state
6. Repeat Steps 1-5 to access the modal classical output
* the quantum magic of interference
7
Objective randomness
• Pseudo-random numbers (PRN)
– Galois field e.g. PN-15 repeats after (215-1) cycles
– Randomizing a randomizer randomly to generate true random number (TRN)
• nope! PRN + PRN ≠ TRN (true entropy missing)
• knowing the seed can still predict the PRN with a TRN seed (e.g. from random.org)
– Wolfram Automata – deterministic, repeatable
– Digits of π or φ (Golden Mean)
– Chaotic system: small differences in the initial conditions results in unpredictable outcomes (complex but still deterministic)
• Random numbers are too important to be left to chance
• Objectively random: experiment controlling all causal parameters still leaves some random outcome
– Hidden variable theories reject the view that nature contains irreducible randomness
• “I am convinced God does not play dice.” - Albert Einstein
• “Don’t tell God what to do with his dice.” – Neils Bohr
8
Quantum coin
• Disclaimer: Quantum computers are not hyper-Turing machines
– possible to completely simulate with classical UTM (albeit, with exponential time or space complexity)
– a classical TM can try all 2n paths corresponding to the possible random bit sequences of a probabilistic TM with n random bits
– Many Worlds interpretation: for every n entangled bits we can carry out a computation in all of 2n entangled parallel worlds, and
then get a little bit of this information back from each world. The clever bit is writing algorithms that guarantee that this little bit is
exactly what we need.
• Flipping a Quantum Coin
– 1 Non-unitary – Projection to ground state in computational basis
– 1 Unitary – Hadamard Gate
– 1 Non-unitary – Measurement in computational basis
• QX Code
• Uses
– Monte Carlo methods
– Cryptography
– Evolutionary algorithms
9
Teleportation
• Transmit 1 qubit
– 1 previously shared Bell pair
– 2 cbits (nope!! not faster than light)
𝐻
y =a0 0 +a1 1
𝐻
𝑋 𝑍
y =a0 0 +a1 1
Share Bell pair
Bell pair measurement
Send
Decode
Received
C. H. Bennett, G. Brassard, C. Crépeau, R. Jozsa, A. Peres, and W. K. Wootters in 1993
10
Bell test for spooky action
https://www.youtube.com/watch?v=AE8MaQJkRcg
11
QX Demo Session 1
• Teleportation
– 𝛼0 = 0
– 𝛼1 = 1
– What happens when you replace x q0 with h q0?
qubits 3
.data
x q0 # create |psi>
.bell_pair
h q1
cnot q1,q2
.encode
cnot q0,q1
h q0
measure q0
measure q1
.decode
cx b1,q2
cz b0,q2
display
12
Superdense coding
• Transmit 2 classical bits (opposite of Teleportation)
– 1 previously shared Bell pair
– 1 qubit
• If no shared entanglement, it is impossible to send two classical bits using 1 qubit, as this would violate Holevo's theorem
• Necessity of having both qubits to decode the information eliminates the risk of eavesdroppers intercepting messages
C. H. Bennett and S. J. Weisner in 1992
H
Prepare & Share
Bell pair
Encode Data
Receive & Decode
ZX
b2 b1
H
b2
b1
13
RSA cryptosystem
• Take 2 prime numbers 𝑝 = 3, 𝑞 = 5
• 𝑁 = 𝑝. 𝑞 = 15
• Choose 𝑒 = 3 co-prime with (𝑝 − 1)(𝑞 − 1) = 8
– Check using Euclid’s algorithm – 𝑂(𝑛3)
• Public key is 𝑁, 𝑒
• Encrypted message is 𝐸𝑖 = 𝑀𝑖
𝑒
𝑚𝑜𝑑 𝑁
• Find 𝑑 = 3 such that, 𝒅. 𝒆 𝒎𝒐𝒅 (𝒑 − 𝟏)(𝒒 − 𝟏) = 𝟏
• Decrypted message is 𝐷𝑖 = 𝐸𝑖
𝑑 𝑚𝑜𝑑 𝑁
• Another example
• 𝑝 = 11, 𝑞 = 13, 𝑁 = 143, 𝑒 = 17
– gcd(𝑒, (𝑝 − 1)(𝑞 − 1)) = 1
• (𝑝 − 1)(𝑞 − 1) = 120
– 𝑑. 17 𝑚𝑖𝑑 120 = 1
– 𝑑 = 113
R. Rivest, A. Shamir and L. Adleman in 1977
NP
P
Bounded Quantum Polynomial
14
Shor’s factorization
• Given N, factorize as a product of primes
– Check N is trivial to factorize using efficient classical methods (prime/even/integer power of prime) , ELSE
• Pick a random co-prime number 𝑎 < 𝑁, i.e. gcd 𝑎, 𝑁 = 1
• Pick a integer 𝑞 that is the power of 2 such that 𝑁2 ≤ 𝑞 < 2𝑁2
• Create 2 quantum registers ۧ|𝑟𝑒𝑔1, 𝑟𝑒𝑔2 each with enough qubits to represent integers as large as 𝑞 − 1
• Load 𝑟𝑒𝑔1 with equal superposition of 0 to q – 1 and load 𝑟𝑒𝑔2 with all zeros
• Apply transformation 𝑎 𝑥 𝑚𝑜𝑑 𝑁 to 𝑟𝑒𝑔1 and store the result in 𝑟𝑒𝑔2 (quantum parallelism)
• Compute the discrete Fourier transform on 𝑟𝑒𝑔1 (quantum parallelism)
• Measure 𝑟𝑒𝑔1 to find 𝑚, which is a multiple of 𝑞/𝑟
• Classical post-processing calculates 𝑟 based on 𝑚 and 𝑞
– Quantum period-finding subroutine to find 𝑟, the period of the function 𝑓 𝑥 = 𝑎 𝑥
𝑚𝑜𝑑 𝑁
• gcd(𝑎 𝑟/2 + 1, 𝑁) and gcd(𝑎 𝑟/2 − 1, 𝑁) are the nontrivial factors of 𝑁
• QFT required 𝑛(𝑛 + 1)/2 gates - polynomial time
– complexity class BQP
– exponentially faster than best classical algorithm
» the general number field sieve
15
State of the art 21 = 7 x 3
16
BB84 QKD
• BB84 quantum key distribution scheme and first provably secure quantum cryptography protocol
– A: Encode 4 ∗ |𝑘𝑒𝑦| random bits in selected basis (𝑍/𝑋/𝑌 at random)
– Each qubit in one of these 6 states: ۧ|0 Z, ۧ|1 Z, ۧ|0 X, ۧ|1 X, ۧ|0 Y, ۧ|1 Y
– B: Measure 4 ∗ |𝑘𝑒𝑦| received bits in selected basis (𝑍/𝑋/𝑌 at random)
– Share the basis information (2 ∗ |𝑘𝑒𝑦| bits will have same basis)
– Test |𝑘𝑒𝑦| bits to see if the channel is compromised, else use the other 𝑘𝑒𝑦 bits
– Information reconciliation with error-correction
– Privacy amplification for compromised bits (leftover hash lemma)
• also, E91
C. H. Bennett and G. Brassard in 1984
Key 0 1 1 0 1 0 0 0 1 1
Alice base Z X X X Z Z X Z X Z
Send state 0 - - + 1 0 + 0 - 1
Eve base X Z X X Z X Z X Z X
State +/- 0/1 - + 1 +/- 0/1 +/- 0/1 +/-
Eve Key 0 1 1 0 1 1 0 1 0 0
Bob base X X X Z X X X Z X X
State + +/- - 0/1 +/- - +/- 0/1 +/- 0
Bob Key 0 1 1 0 0 1 1 1 1 0
17
NP
Searching solutions
𝑦𝑠 = 𝑓(𝑥 𝑠) 𝑦𝑠 = 𝑓(𝑥 𝑠) 𝑦𝑠 = 𝑓(𝑥 𝑠)
𝑥 𝑠 = 𝑓−1
(𝑦𝑠)
𝑦0 = 𝑓 𝑥0
𝑦1 = 𝑓 𝑥1
𝑦2 = 𝑓 𝑥2 = 𝑦𝑠
𝑦3 = 𝑓 𝑥3
⋮
Function Evaluation Inductive Logic, GP, ANN, …Function Inversion
Quantum Superposition
P
Bounded Quantum Polynomial
18
Amplitude
Probability
Grover’s search
+1|000ۧ
+0.3536|000ۧ
+0.3536|001ۧ
+0.3536|010ۧ
+0.3536|011ۧ
+0.3536|100ۧ
+0.3536|101ۧ
+0.3536|110ۧ
+0.3536|111ۧ
+0.3536|000ۧ
+0.3536|001ۧ
+0.3536|010ۧ
+0.3536|011ۧ
+0.3536|100ۧ
-0.3536|101ۧ
+0.3536|110ۧ
+0.3536|111ۧ
μ=+0.2652
+0.1768|000ۧ
+0.1768|001ۧ
+0.1768|010ۧ
+0.1768|011ۧ
+0.1768|100ۧ
+0.8839|101ۧ
+0.1768|110ۧ
+0.1768|111ۧ
3% |000ۧ
3% |001ۧ
3% |010ۧ
3% |011ۧ
3% |100ۧ
78% |101ۧ
3% |110ۧ
3% |111ۧ
+0.1768|000ۧ
+0.1768|001ۧ
+0.1768|010ۧ
+0.1768|011ۧ
+0.1768|100ۧ
-0.8839|101ۧ
+0.1768|110ۧ
+0.1768|111ۧ
μ=+0.0442
-0.0884|000ۧ
-0.0884|001ۧ
-0.0884|010ۧ
-0.0884|011ۧ
-0.0884|100ۧ
+0.9723|101ۧ
-0.0884|110ۧ
-0.0884|111ۧ
0.8% |000ۧ
0.8% |001ۧ
0.8% |010ۧ
0.8% |011ۧ
0.8% |100ۧ
94.5% |101ۧ
0.8% |110ۧ
0.8% |111ۧ
H⊗n Oracle
Inversion
about Mean|0ۧ⊗n answer
𝑂 2 𝑛 times
• unstructured database
• assumes existence of a Black-box Oracle
• quadratic reduction in query complexity
• periodic amplification
19
QX Demo Session 2
• Grover search
– Full superposition of 3 qubits
– Mark state 101
– Invert about mean (Hn,CZn,Hn)
• Can we find more than 1 element?
• Can we start with an unequal superposition?
• Do we need to know the Oracle circuit before we code/compile?
qubits 3
prepz q0
prepz q1
prepz q2
.init
h q0
h q1
h q2
.grover(2)
#oracle
#inv_abt_mean
display
#amp_amplify
h q0
h q1
h q2
x q0
x q1
x q2
h q2
toffoli q0, q1, q2
h q2
x q2
x q1
x q0
h q2
h q1
h q0
#mark 101
x q1
h q2
toffoli q0, q1, q2
h q2
x q1
20
Q Infinity & Q Inspire
• Quantum Infinity
– DiCarlo lab (QuTech)
– Simulator (QX and QuantumSim)
– Superconducting qubits
• Quantum Inspire
– QuTech (TU Delft + TNO)
– ~ 37 qubits simulator on Cartesius supercomputer with SURFsara
– Semiconducting qubits
21
Quantum HLL
• OpenQL (inspired by OpenCL)
• Programs (Kernels (Operations))
– Decompose: Toffoli, Control, Unitary, Rotation, CX-CZ
– Optimize: Cancel UU†
– Scheduling: ASAP, ALAP, Balanced
– Mapping: Surface-17 connectivity routing
– QASM: cQASM, eQASM (topology, resource constraints)
• Other features:
– Conjugate uncompute
– Classical logical/comparative operations
– Language features
• Recursion, loops, functions
• Libraries like NumPy, Matplotlib
Configure Platform
Create Program
Create Kernels
Populate each Kernel
Add Kernels to Program
Compile Program
22
OpenQL example
Initialize Make/Call Oracles Inversion about mean
23
Quantum acceleration of genomics
Quantum Complexity Theory
Quantum Algorithms
Computing Applications
Architecture-aware Implementations
2-40 EB/year
Genomical Big Data
QISA0
cqIR
24
Conditional oracle for sub-sequence indexing
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
0
1
2
4
3
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Oracle Fn. A
Oracle Fn. C
Oracle Fn. G
Oracle Fn. T
Reference
Search Pattern
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
MinimizationNP-Hard
Precomputed
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
25
Pattern matching
DNA Fingerprinting Motif FindingAmino-acid Sequencing
Pattern based Trading Object RecognitionSpeech Recognition
18x18 px
17 qubits
~ 50k gates
Exact matching
26
Near-term algorithms
• Peter Shor’s estimates
– Without QEC, Shor’s algorithm needs ~5k qubits to factor cryptographically significant numbers
– With error correction, ~1 million
– ~100 millions gate operations
• Near-Term Quantum Algorithms
– runs on few qubits (low depth circuits) without extensive QEC (small-codes)
– enough qubits to just store the problem (hard to do better)
– still solve useful problems with local constraints
– Adaptable optimization algorithms (easy to map to problem) e.g. GA, SA, DL
• Quantum/classical hybrid algorithm
– Parameterised quantum subroutine is run within a classical optimization loop
– Variational theorem
– Heuristic, no general recipe that works universally for all problem
https://www.bcg.com/en-ca/publications/2018/next-decade-quantum-computing-how-play.aspx
27
Quantum Approximate Optimization Algorithm
• Approximate algorithm for NP-Hard problems
– Polynomial-time solution for every instance with guaranteed quality
– QAOA is interesting because of its potential to exhibit quantum supremacy
– Structure
• Driver/Mixing function (solution space hard constraints)
• Cost function (problem soft constraints)
• Classical parameter optimizer
• Max-Cut: 𝑆 ⊆ 𝑉 (vertex set) such that the number of edges between 𝑆 and ҧ𝑆 is as large as possible
0
011110
100001
543210
1
2
34
5
111110
000001
101110
010001
28
Ready for more?
29
‘real’ Quantum games
30
Quantum algorithms
on the QX Simulator
HiPEAC 2019, Valencia
Ir. Aritra Sarkar
Dr. Carmen G. Almudever
Prof. Dr. Koen Bertels
{A.Sarkar-3/C.GraciaAlmudever-1/K.L.M.Bertels}@tudelft.nl
Quantum Computer Architecture Lab
Delft University of Technology

Mais conteúdo relacionado

Mais procurados

Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18
Aritra Sarkar
 
MSc Thesis Defense Presentation
MSc Thesis Defense PresentationMSc Thesis Defense Presentation
MSc Thesis Defense Presentation
Mostafa Elhoushi
 
Quantum computing for CS students: open source software
Quantum computing for CS students: open source softwareQuantum computing for CS students: open source software
Quantum computing for CS students: open source software
Bruno Fedrici, PhD
 
Cache aware hybrid sorter
Cache aware hybrid sorterCache aware hybrid sorter
Cache aware hybrid sorter
Manchor Ko
 

Mais procurados (20)

Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18
 
2017 10 17_quantum_program_v2
2017 10 17_quantum_program_v22017 10 17_quantum_program_v2
2017 10 17_quantum_program_v2
 
2017 07 04_cmmse_quantum_programming_v1
2017 07 04_cmmse_quantum_programming_v12017 07 04_cmmse_quantum_programming_v1
2017 07 04_cmmse_quantum_programming_v1
 
Quantum Computers
Quantum ComputersQuantum Computers
Quantum Computers
 
Quantum programming
Quantum programmingQuantum programming
Quantum programming
 
Quantum Machine Learning for IBM AI
Quantum Machine Learning for IBM AIQuantum Machine Learning for IBM AI
Quantum Machine Learning for IBM AI
 
Quantum Computing Fundamentals via OO
Quantum Computing Fundamentals via OOQuantum Computing Fundamentals via OO
Quantum Computing Fundamentals via OO
 
MSc Thesis Defense Presentation
MSc Thesis Defense PresentationMSc Thesis Defense Presentation
MSc Thesis Defense Presentation
 
02 analysis
02 analysis02 analysis
02 analysis
 
Ibm quantum computing
Ibm quantum computingIbm quantum computing
Ibm quantum computing
 
Analysis
AnalysisAnalysis
Analysis
 
A petri-net
A petri-netA petri-net
A petri-net
 
NSC #2 - D1 05 - Renaud Lifchitz - Quantum computing in practice
NSC #2 - D1 05 - Renaud Lifchitz - Quantum computing in practiceNSC #2 - D1 05 - Renaud Lifchitz - Quantum computing in practice
NSC #2 - D1 05 - Renaud Lifchitz - Quantum computing in practice
 
JVM Memory Model - Yoav Abrahami, Wix
JVM Memory Model - Yoav Abrahami, WixJVM Memory Model - Yoav Abrahami, Wix
JVM Memory Model - Yoav Abrahami, Wix
 
Using R in remote computer clusters
Using R in remote computer clustersUsing R in remote computer clusters
Using R in remote computer clusters
 
Exploring Petri Net State Spaces
Exploring Petri Net State SpacesExploring Petri Net State Spaces
Exploring Petri Net State Spaces
 
Quantum computing for CS students: open source software
Quantum computing for CS students: open source softwareQuantum computing for CS students: open source software
Quantum computing for CS students: open source software
 
The second quantum revolution: the world beyond binary 0 and 1
The second quantum revolution: the world beyond binary 0 and 1The second quantum revolution: the world beyond binary 0 and 1
The second quantum revolution: the world beyond binary 0 and 1
 
Quantum computing for CS students: the unitary circuit model
Quantum computing for CS students: the unitary circuit modelQuantum computing for CS students: the unitary circuit model
Quantum computing for CS students: the unitary circuit model
 
Cache aware hybrid sorter
Cache aware hybrid sorterCache aware hybrid sorter
Cache aware hybrid sorter
 

Semelhante a HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23

hddhdhdhdhdhdhdhdhdhddhddhdhdhdhddhdhdddhdhdh
hddhdhdhdhdhdhdhdhdhddhddhdhdhdhddhdhdddhdhdhhddhdhdhdhdhdhdhdhdhddhddhdhdhdhddhdhdddhdhdh
hddhdhdhdhdhdhdhdhdhddhddhdhdhdhddhdhdddhdhdh
zoobiarana76
 

Semelhante a HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23 (20)

Quantum Computing
Quantum ComputingQuantum Computing
Quantum Computing
 
Quantum computing - A Compilation of Concepts
Quantum computing - A Compilation of ConceptsQuantum computing - A Compilation of Concepts
Quantum computing - A Compilation of Concepts
 
A short introduction to Quantum Computing and Quantum Cryptography
A short introduction to Quantum Computing and Quantum CryptographyA short introduction to Quantum Computing and Quantum Cryptography
A short introduction to Quantum Computing and Quantum Cryptography
 
Quantum Computation For AI
Quantum Computation For AIQuantum Computation For AI
Quantum Computation For AI
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.ppt
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.ppt
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.ppt
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.ppt
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.ppt
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.ppt
 
quantumComputers (1).ppt
quantumComputers (1).pptquantumComputers (1).ppt
quantumComputers (1).ppt
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.ppt
 
quantumComputers.pptICICI-An HR perspective
quantumComputers.pptICICI-An HR perspectivequantumComputers.pptICICI-An HR perspective
quantumComputers.pptICICI-An HR perspective
 
quantumComputers.ppt
quantumComputers.pptquantumComputers.ppt
quantumComputers.ppt
 
hddhdhdhdhdhdhdhdhdhddhddhdhdhdhddhdhdddhdhdh
hddhdhdhdhdhdhdhdhdhddhddhdhdhdhddhdhdddhdhdhhddhdhdhdhdhdhdhdhdhddhddhdhdhdhddhdhdddhdhdh
hddhdhdhdhdhdhdhdhdhddhddhdhdhdhddhdhdddhdhdh
 
QC - UNIT 1.ppt
QC - UNIT 1.pptQC - UNIT 1.ppt
QC - UNIT 1.ppt
 
Quantum Computers
Quantum ComputersQuantum Computers
Quantum Computers
 
Shor’s algorithm the ppt
Shor’s algorithm the pptShor’s algorithm the ppt
Shor’s algorithm the ppt
 
Modern Cryptography
Modern CryptographyModern Cryptography
Modern Cryptography
 
Week3 ap3421 2019_part1
Week3 ap3421 2019_part1Week3 ap3421 2019_part1
Week3 ap3421 2019_part1
 

Mais de Aritra Sarkar

Mais de Aritra Sarkar (16)

CV Aritra 08-2020
CV Aritra 08-2020CV Aritra 08-2020
CV Aritra 08-2020
 
ASTROSAT SSR - 2015-05-15
ASTROSAT SSR - 2015-05-15ASTROSAT SSR - 2015-05-15
ASTROSAT SSR - 2015-05-15
 
Ccsds based file delivery protocol (cfdp) v1p3
Ccsds based file delivery protocol (cfdp) v1p3Ccsds based file delivery protocol (cfdp) v1p3
Ccsds based file delivery protocol (cfdp) v1p3
 
Optimized Multi-agent Box-pushing - 2017-10-24
Optimized Multi-agent Box-pushing - 2017-10-24Optimized Multi-agent Box-pushing - 2017-10-24
Optimized Multi-agent Box-pushing - 2017-10-24
 
Computer-Vision based Centralized Multi-agent System on Matlab and Arduino Du...
Computer-Vision based Centralized Multi-agent System on Matlab and Arduino Du...Computer-Vision based Centralized Multi-agent System on Matlab and Arduino Du...
Computer-Vision based Centralized Multi-agent System on Matlab and Arduino Du...
 
Jupiter - The gas giant - 2012-11-06
Jupiter - The gas giant - 2012-11-06Jupiter - The gas giant - 2012-11-06
Jupiter - The gas giant - 2012-11-06
 
DuinOS controlled Rover with MATLAB 2009 and Android GingerBread - 2012-11-04
DuinOS controlled Rover with MATLAB 2009 and Android GingerBread - 2012-11-04DuinOS controlled Rover with MATLAB 2009 and Android GingerBread - 2012-11-04
DuinOS controlled Rover with MATLAB 2009 and Android GingerBread - 2012-11-04
 
Multi-Vehicle Path Planning In Dynamically Changing Environments - 2012-11-19
Multi-Vehicle Path Planning In Dynamically Changing Environments - 2012-11-19Multi-Vehicle Path Planning In Dynamically Changing Environments - 2012-11-19
Multi-Vehicle Path Planning In Dynamically Changing Environments - 2012-11-19
 
Fractal Rendering in Developer C++ - 2012-11-06
Fractal Rendering in Developer C++ - 2012-11-06Fractal Rendering in Developer C++ - 2012-11-06
Fractal Rendering in Developer C++ - 2012-11-06
 
Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...
Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...
Self-configuring Classical Logic Gate Circuits using Genetic Programming in J...
 
Elevation mapping using stereo vision enabled heterogeneous multi-agent robot...
Elevation mapping using stereo vision enabled heterogeneous multi-agent robot...Elevation mapping using stereo vision enabled heterogeneous multi-agent robot...
Elevation mapping using stereo vision enabled heterogeneous multi-agent robot...
 
Artificial Intelligence for Robotics - Statement of Accomplishment
Artificial Intelligence for Robotics - Statement of AccomplishmentArtificial Intelligence for Robotics - Statement of Accomplishment
Artificial Intelligence for Robotics - Statement of Accomplishment
 
Machine Learning - Statement of Accomplishment
Machine Learning - Statement of AccomplishmentMachine Learning - Statement of Accomplishment
Machine Learning - Statement of Accomplishment
 
Introduction to Artificial Intelligence - Statement of Accomplishment
Introduction to Artificial Intelligence - Statement of AccomplishmentIntroduction to Artificial Intelligence - Statement of Accomplishment
Introduction to Artificial Intelligence - Statement of Accomplishment
 
Quantum Mechanics and Quantum Computation - Statement of Accomplishment
Quantum Mechanics and Quantum Computation - Statement of AccomplishmentQuantum Mechanics and Quantum Computation - Statement of Accomplishment
Quantum Mechanics and Quantum Computation - Statement of Accomplishment
 
Aritra Sarkar - Curriculum vitae
Aritra Sarkar - Curriculum vitaeAritra Sarkar - Curriculum vitae
Aritra Sarkar - Curriculum vitae
 

Último

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Último (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 

HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23

  • 1. Quantum algorithms on the QX Simulator HiPEAC 2019, Valencia Ir. Aritra Sarkar Dr. Carmen G. Almudever Prof. Dr. Koen Bertels {A.Sarkar-3/C.GraciaAlmudever-1/K.L.M.Bertels}@tudelft.nl Quantum Computer Architecture Lab Delft University of Technology
  • 2. 2 Using a QC 101 • For this part of the Tutorial, assume – You have a “big” quantum computer – The qubits are “perfect” • What would you do with it? – https://math.nist.gov/ • How would you do it? – Quantum Programming • Circuit builder • QASM • High-level language
  • 3. 3 Conventions cheat sheet  Circuits – LSQ on top  String representation of state – LSQ on right  Vector representation of state – LSQ increments before MSQ  Multi-qubit operators ۧ|𝑞0 ۧ|𝑞1 ... H ۧ| … 𝑞1 𝑞0 𝑎 ۧ|00 𝑎 ۧ|01 𝑎 ۧ|10 𝑎 ۧ|11 𝐼 𝑞1 ⊗ 𝐻 𝑞0 = 1 2 1 1 0 0 1 −1 0 0 0 0 1 1 0 0 1 −1 𝐶𝑁𝑂𝑇𝑐𝑡 = 𝐶𝑁𝑂𝑇𝑞0 𝑞1 = 1 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 𝐶𝑁𝑂𝑇𝑐𝑡 = 𝐶𝑁𝑂𝑇𝑞1 𝑞0 = 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0
  • 4. 4 Necessary evil a 2 b 2 • No-cloning theorem – Qubits cannot be copied for QEC encoding – Good for communication secrecy; bad for computing • Participatory observer – Measurement projects the superposition state probabilistically onto the basis states • ۧ𝜓 = 𝛼 ۧ0 + 𝛽| ۧ1 • P +1 = 𝛼 2 • P −1 = 𝛽 2 – Non-unitary, non-reversible – Fundamental indeterminacy, not measurement error! – 1 measurement cannot reveal the initial state • however, decides its final state One can extract only the same amount of data from a quantum computer that one could from a classical computer of the same size
  • 5. 5 Classical computing • NAND gate + FanOut = all logic for classical Boolean algebra • How to do classical computing with just 1 quantum gate? – The Toffoli gate (a.k.a. CC-NOT; CCX) • 2 control bits flip the target when both are high • NAND: CCX = xy1, FanOut: CCX = 1x0 • How about an adder? FANOUT cba y 000 0 001 1 010 0 011 1 100 0 101 1 110 1 111 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0
  • 6. 6 Dissecting a quantum algorithm Superpose Soln. Space Encode Function Clever Process Measure Initialize |0ۧ⊗n Classical Output Classical Input 1. Prepare all-zero state for n-qubits (not so trivial experimentally as it sounds) 2. Full superposition in computational basis (H-gate on all qubits) – OR, superposition of classical input space 3. Transform superposition to evaluate the function (using 1 & 2 qubit gates) – OR, evaluate function based on classical input space 4. Somehow* increase the amplitude of the solution space 5. Measure out the state 6. Repeat Steps 1-5 to access the modal classical output * the quantum magic of interference
  • 7. 7 Objective randomness • Pseudo-random numbers (PRN) – Galois field e.g. PN-15 repeats after (215-1) cycles – Randomizing a randomizer randomly to generate true random number (TRN) • nope! PRN + PRN ≠ TRN (true entropy missing) • knowing the seed can still predict the PRN with a TRN seed (e.g. from random.org) – Wolfram Automata – deterministic, repeatable – Digits of π or φ (Golden Mean) – Chaotic system: small differences in the initial conditions results in unpredictable outcomes (complex but still deterministic) • Random numbers are too important to be left to chance • Objectively random: experiment controlling all causal parameters still leaves some random outcome – Hidden variable theories reject the view that nature contains irreducible randomness • “I am convinced God does not play dice.” - Albert Einstein • “Don’t tell God what to do with his dice.” – Neils Bohr
  • 8. 8 Quantum coin • Disclaimer: Quantum computers are not hyper-Turing machines – possible to completely simulate with classical UTM (albeit, with exponential time or space complexity) – a classical TM can try all 2n paths corresponding to the possible random bit sequences of a probabilistic TM with n random bits – Many Worlds interpretation: for every n entangled bits we can carry out a computation in all of 2n entangled parallel worlds, and then get a little bit of this information back from each world. The clever bit is writing algorithms that guarantee that this little bit is exactly what we need. • Flipping a Quantum Coin – 1 Non-unitary – Projection to ground state in computational basis – 1 Unitary – Hadamard Gate – 1 Non-unitary – Measurement in computational basis • QX Code • Uses – Monte Carlo methods – Cryptography – Evolutionary algorithms
  • 9. 9 Teleportation • Transmit 1 qubit – 1 previously shared Bell pair – 2 cbits (nope!! not faster than light) 𝐻 y =a0 0 +a1 1 𝐻 𝑋 𝑍 y =a0 0 +a1 1 Share Bell pair Bell pair measurement Send Decode Received C. H. Bennett, G. Brassard, C. Crépeau, R. Jozsa, A. Peres, and W. K. Wootters in 1993
  • 10. 10 Bell test for spooky action https://www.youtube.com/watch?v=AE8MaQJkRcg
  • 11. 11 QX Demo Session 1 • Teleportation – 𝛼0 = 0 – 𝛼1 = 1 – What happens when you replace x q0 with h q0? qubits 3 .data x q0 # create |psi> .bell_pair h q1 cnot q1,q2 .encode cnot q0,q1 h q0 measure q0 measure q1 .decode cx b1,q2 cz b0,q2 display
  • 12. 12 Superdense coding • Transmit 2 classical bits (opposite of Teleportation) – 1 previously shared Bell pair – 1 qubit • If no shared entanglement, it is impossible to send two classical bits using 1 qubit, as this would violate Holevo's theorem • Necessity of having both qubits to decode the information eliminates the risk of eavesdroppers intercepting messages C. H. Bennett and S. J. Weisner in 1992 H Prepare & Share Bell pair Encode Data Receive & Decode ZX b2 b1 H b2 b1
  • 13. 13 RSA cryptosystem • Take 2 prime numbers 𝑝 = 3, 𝑞 = 5 • 𝑁 = 𝑝. 𝑞 = 15 • Choose 𝑒 = 3 co-prime with (𝑝 − 1)(𝑞 − 1) = 8 – Check using Euclid’s algorithm – 𝑂(𝑛3) • Public key is 𝑁, 𝑒 • Encrypted message is 𝐸𝑖 = 𝑀𝑖 𝑒 𝑚𝑜𝑑 𝑁 • Find 𝑑 = 3 such that, 𝒅. 𝒆 𝒎𝒐𝒅 (𝒑 − 𝟏)(𝒒 − 𝟏) = 𝟏 • Decrypted message is 𝐷𝑖 = 𝐸𝑖 𝑑 𝑚𝑜𝑑 𝑁 • Another example • 𝑝 = 11, 𝑞 = 13, 𝑁 = 143, 𝑒 = 17 – gcd(𝑒, (𝑝 − 1)(𝑞 − 1)) = 1 • (𝑝 − 1)(𝑞 − 1) = 120 – 𝑑. 17 𝑚𝑖𝑑 120 = 1 – 𝑑 = 113 R. Rivest, A. Shamir and L. Adleman in 1977 NP P Bounded Quantum Polynomial
  • 14. 14 Shor’s factorization • Given N, factorize as a product of primes – Check N is trivial to factorize using efficient classical methods (prime/even/integer power of prime) , ELSE • Pick a random co-prime number 𝑎 < 𝑁, i.e. gcd 𝑎, 𝑁 = 1 • Pick a integer 𝑞 that is the power of 2 such that 𝑁2 ≤ 𝑞 < 2𝑁2 • Create 2 quantum registers ۧ|𝑟𝑒𝑔1, 𝑟𝑒𝑔2 each with enough qubits to represent integers as large as 𝑞 − 1 • Load 𝑟𝑒𝑔1 with equal superposition of 0 to q – 1 and load 𝑟𝑒𝑔2 with all zeros • Apply transformation 𝑎 𝑥 𝑚𝑜𝑑 𝑁 to 𝑟𝑒𝑔1 and store the result in 𝑟𝑒𝑔2 (quantum parallelism) • Compute the discrete Fourier transform on 𝑟𝑒𝑔1 (quantum parallelism) • Measure 𝑟𝑒𝑔1 to find 𝑚, which is a multiple of 𝑞/𝑟 • Classical post-processing calculates 𝑟 based on 𝑚 and 𝑞 – Quantum period-finding subroutine to find 𝑟, the period of the function 𝑓 𝑥 = 𝑎 𝑥 𝑚𝑜𝑑 𝑁 • gcd(𝑎 𝑟/2 + 1, 𝑁) and gcd(𝑎 𝑟/2 − 1, 𝑁) are the nontrivial factors of 𝑁 • QFT required 𝑛(𝑛 + 1)/2 gates - polynomial time – complexity class BQP – exponentially faster than best classical algorithm » the general number field sieve
  • 15. 15 State of the art 21 = 7 x 3
  • 16. 16 BB84 QKD • BB84 quantum key distribution scheme and first provably secure quantum cryptography protocol – A: Encode 4 ∗ |𝑘𝑒𝑦| random bits in selected basis (𝑍/𝑋/𝑌 at random) – Each qubit in one of these 6 states: ۧ|0 Z, ۧ|1 Z, ۧ|0 X, ۧ|1 X, ۧ|0 Y, ۧ|1 Y – B: Measure 4 ∗ |𝑘𝑒𝑦| received bits in selected basis (𝑍/𝑋/𝑌 at random) – Share the basis information (2 ∗ |𝑘𝑒𝑦| bits will have same basis) – Test |𝑘𝑒𝑦| bits to see if the channel is compromised, else use the other 𝑘𝑒𝑦 bits – Information reconciliation with error-correction – Privacy amplification for compromised bits (leftover hash lemma) • also, E91 C. H. Bennett and G. Brassard in 1984 Key 0 1 1 0 1 0 0 0 1 1 Alice base Z X X X Z Z X Z X Z Send state 0 - - + 1 0 + 0 - 1 Eve base X Z X X Z X Z X Z X State +/- 0/1 - + 1 +/- 0/1 +/- 0/1 +/- Eve Key 0 1 1 0 1 1 0 1 0 0 Bob base X X X Z X X X Z X X State + +/- - 0/1 +/- - +/- 0/1 +/- 0 Bob Key 0 1 1 0 0 1 1 1 1 0
  • 17. 17 NP Searching solutions 𝑦𝑠 = 𝑓(𝑥 𝑠) 𝑦𝑠 = 𝑓(𝑥 𝑠) 𝑦𝑠 = 𝑓(𝑥 𝑠) 𝑥 𝑠 = 𝑓−1 (𝑦𝑠) 𝑦0 = 𝑓 𝑥0 𝑦1 = 𝑓 𝑥1 𝑦2 = 𝑓 𝑥2 = 𝑦𝑠 𝑦3 = 𝑓 𝑥3 ⋮ Function Evaluation Inductive Logic, GP, ANN, …Function Inversion Quantum Superposition P Bounded Quantum Polynomial
  • 18. 18 Amplitude Probability Grover’s search +1|000ۧ +0.3536|000ۧ +0.3536|001ۧ +0.3536|010ۧ +0.3536|011ۧ +0.3536|100ۧ +0.3536|101ۧ +0.3536|110ۧ +0.3536|111ۧ +0.3536|000ۧ +0.3536|001ۧ +0.3536|010ۧ +0.3536|011ۧ +0.3536|100ۧ -0.3536|101ۧ +0.3536|110ۧ +0.3536|111ۧ μ=+0.2652 +0.1768|000ۧ +0.1768|001ۧ +0.1768|010ۧ +0.1768|011ۧ +0.1768|100ۧ +0.8839|101ۧ +0.1768|110ۧ +0.1768|111ۧ 3% |000ۧ 3% |001ۧ 3% |010ۧ 3% |011ۧ 3% |100ۧ 78% |101ۧ 3% |110ۧ 3% |111ۧ +0.1768|000ۧ +0.1768|001ۧ +0.1768|010ۧ +0.1768|011ۧ +0.1768|100ۧ -0.8839|101ۧ +0.1768|110ۧ +0.1768|111ۧ μ=+0.0442 -0.0884|000ۧ -0.0884|001ۧ -0.0884|010ۧ -0.0884|011ۧ -0.0884|100ۧ +0.9723|101ۧ -0.0884|110ۧ -0.0884|111ۧ 0.8% |000ۧ 0.8% |001ۧ 0.8% |010ۧ 0.8% |011ۧ 0.8% |100ۧ 94.5% |101ۧ 0.8% |110ۧ 0.8% |111ۧ H⊗n Oracle Inversion about Mean|0ۧ⊗n answer 𝑂 2 𝑛 times • unstructured database • assumes existence of a Black-box Oracle • quadratic reduction in query complexity • periodic amplification
  • 19. 19 QX Demo Session 2 • Grover search – Full superposition of 3 qubits – Mark state 101 – Invert about mean (Hn,CZn,Hn) • Can we find more than 1 element? • Can we start with an unequal superposition? • Do we need to know the Oracle circuit before we code/compile? qubits 3 prepz q0 prepz q1 prepz q2 .init h q0 h q1 h q2 .grover(2) #oracle #inv_abt_mean display #amp_amplify h q0 h q1 h q2 x q0 x q1 x q2 h q2 toffoli q0, q1, q2 h q2 x q2 x q1 x q0 h q2 h q1 h q0 #mark 101 x q1 h q2 toffoli q0, q1, q2 h q2 x q1
  • 20. 20 Q Infinity & Q Inspire • Quantum Infinity – DiCarlo lab (QuTech) – Simulator (QX and QuantumSim) – Superconducting qubits • Quantum Inspire – QuTech (TU Delft + TNO) – ~ 37 qubits simulator on Cartesius supercomputer with SURFsara – Semiconducting qubits
  • 21. 21 Quantum HLL • OpenQL (inspired by OpenCL) • Programs (Kernels (Operations)) – Decompose: Toffoli, Control, Unitary, Rotation, CX-CZ – Optimize: Cancel UU† – Scheduling: ASAP, ALAP, Balanced – Mapping: Surface-17 connectivity routing – QASM: cQASM, eQASM (topology, resource constraints) • Other features: – Conjugate uncompute – Classical logical/comparative operations – Language features • Recursion, loops, functions • Libraries like NumPy, Matplotlib Configure Platform Create Program Create Kernels Populate each Kernel Add Kernels to Program Compile Program
  • 22. 22 OpenQL example Initialize Make/Call Oracles Inversion about mean
  • 23. 23 Quantum acceleration of genomics Quantum Complexity Theory Quantum Algorithms Computing Applications Architecture-aware Implementations 2-40 EB/year Genomical Big Data QISA0 cqIR
  • 24. 24 Conditional oracle for sub-sequence indexing 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 1 2 4 3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Oracle Fn. A Oracle Fn. C Oracle Fn. G Oracle Fn. T Reference Search Pattern 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 MinimizationNP-Hard Precomputed 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
  • 25. 25 Pattern matching DNA Fingerprinting Motif FindingAmino-acid Sequencing Pattern based Trading Object RecognitionSpeech Recognition 18x18 px 17 qubits ~ 50k gates Exact matching
  • 26. 26 Near-term algorithms • Peter Shor’s estimates – Without QEC, Shor’s algorithm needs ~5k qubits to factor cryptographically significant numbers – With error correction, ~1 million – ~100 millions gate operations • Near-Term Quantum Algorithms – runs on few qubits (low depth circuits) without extensive QEC (small-codes) – enough qubits to just store the problem (hard to do better) – still solve useful problems with local constraints – Adaptable optimization algorithms (easy to map to problem) e.g. GA, SA, DL • Quantum/classical hybrid algorithm – Parameterised quantum subroutine is run within a classical optimization loop – Variational theorem – Heuristic, no general recipe that works universally for all problem https://www.bcg.com/en-ca/publications/2018/next-decade-quantum-computing-how-play.aspx
  • 27. 27 Quantum Approximate Optimization Algorithm • Approximate algorithm for NP-Hard problems – Polynomial-time solution for every instance with guaranteed quality – QAOA is interesting because of its potential to exhibit quantum supremacy – Structure • Driver/Mixing function (solution space hard constraints) • Cost function (problem soft constraints) • Classical parameter optimizer • Max-Cut: 𝑆 ⊆ 𝑉 (vertex set) such that the number of edges between 𝑆 and ҧ𝑆 is as large as possible 0 011110 100001 543210 1 2 34 5 111110 000001 101110 010001
  • 30. 30 Quantum algorithms on the QX Simulator HiPEAC 2019, Valencia Ir. Aritra Sarkar Dr. Carmen G. Almudever Prof. Dr. Koen Bertels {A.Sarkar-3/C.GraciaAlmudever-1/K.L.M.Bertels}@tudelft.nl Quantum Computer Architecture Lab Delft University of Technology