layout: true
--- class: title-slide, center, middle
--- # .darkblue[Quantum Mechanics] .reference[Picture:
Source
] .more-more-condensed.no-margin[
.more-more-condensed[ - .darkblue[Very small particles and light behave differently from objects in normal life] - .darkblue[Mechanics of light and matter at the atomic and subatomic scale are described by quantum theory] - forming the underlying principles of chemistry and most of physics - .darkblue[Quantum theory has brought us the information age with] its disruptive .darkblue[technologies of] - .darkblue[transistors], - .darkblue[lasers], - .darkblue[nuclear power], and - .darkblue[superconductivity]... - .bold.darkred[...and now also quantum computers!] ]
.smaller-font[.darkblue[Wavefunctions of the electron] in a hydrogen atom at different energy levels. .darkblue[Brighter areas represent a higher probability] of finding the electron.]
] --- # .darkblue[Timeline of important events] .reference[
[F'82]
[A+'19]
[P+'19]
[PCZ'21]
] .more-more-condensed[ - .bold.darkblue[1982]: .darkblue[Feynman] first .darkblue[proposes] the concept of .darkblue[quantum computers] [F'82] - .bold.darkblue[2019]: .darkblue[Google announces "Quantum Supremacy"] by its 53-bit chip "Sycamore" [A+'19] - .darkblue[200 seconds on Sycamore versus 10,000 years on the world’s fastest supercomputer] IBM Summit - .darkblue[IBM] [P+'19]: .darkblue[only 2.5 days on classical supercomputer] after deduction of the problem (i.e., using a better classical algorithm) with more disk space - .darkblue[Pan, Chen and Zhang] [PCZ'21]: .darkblue[only 15 hours on 512 GPU-cluster] using another classical algorithm for obtaining a large number of uncorrelated samples - Estimation: a few dozens of seconds on a modern supercomputer with ExaFLOPS performance - .darkblue[Discussion intensified] the excessive .darkblue[hype about] the current state of .darkblue[quantum technology] ] --- # Architectures of .darkblue[Emergent Hardware] .reference[Extended from
C. Plessl, Accelerating Scientific Computing with Massively Parallel Computer Architectures, IMPRS Winter School, Wroclaw, 2012
]
--- #
.darkblue[Quantum Computer] .reference[
T. Bittner, S. Groppe. Avoiding blocking by scheduling transactions using quantum annealing. .em[IDEAS '20]
] .more-more-condensed[
use of .darkblue[quantum-mechanical phenomena such as superposition and entanglement] to perform computation
Different types of quantum computer, e.g.
.darkblue[Universal Quantum Computer]
uses
quantum logic gates
arranged in a circuit to do computation
measurement
(sometimes called observation) assigns the observed variable to a single value
.darkblue[Quantum Annealing]
metaheuristic for finding the global minimum
of a given objective function over a given set of candidate solutions
i.e., some way to solve a special type of
mathematical optimization problem
]
.smaller-font.darkblue[Quantum Circuit (Full Adder)]
.smaller-font.darkblue[Simulated versus Quantum Annealing]
--- # .darkblue[Classical versus Quantum Computing] .more-more-condensed.small-font[
Classical
Quantum
Information Unit
.bold[Bi]nary Digi.bold[t] (.darkblue[Bit]):
basis of a .darkblue[2-level system]
can be .darkblue[in state $0$ or $1$]
.bold[Qu]antum .bold[Bit] (.darkblue[Qubit]):
basis of a .darkblue[2-level quantum system]
can be .darkblue[in state $|0\rangle$, $|1\rangle$ or in] a .darkblue[linear combination of both states]
Operation
.darkblue[Logic Gate:]
performs .darkblue[on 1 or more bits to produce] a single .darkblue[bit output]
.darkblue[Quantum Logic Gate:]
performs .darkblue[on 1 or more qubits to change the quantum state of] a .darkblue[single qubit]
Example Operation
.darkblue[NOT]/Inverter:
Digital Circuit:
$In$
$Out$
$0$
$1$
$1$
$0$
.darkblue[NOT]/Pauli
$x$
-Gate:
Quantum Circuit:
Alternatively:
$In$
$Out$
$|0\rangle$
$|1\rangle$
$|1\rangle$
$|0\rangle$
$\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)$
$\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)$
$\frac{3\cdot i}{5}|0\rangle+\frac{4}{5}|1\rangle$
$\frac{4}{5}|0\rangle+\frac{3\cdot i}{5}|1\rangle$
] --- # Representation of a .darkblue[Qubit in Bloch-Sphere] .more-more-condensed[ - Angels .darkblue[$\theta$ and $\phi$] can be associated with .darkblue[spherical coordinates on] the so-called .darkblue[Bloch-sphere]:
] --- # .darkblue[Classical Measurement/Observation] .more-more-condensed[ - The .darkblue[state is not destroyed] by a measurement/observation in classical systems:
] --- # .darkblue[Quantum Measurement/Observation] 1/2 .more-more-condensed[ - The .darkblue[state is not destroyed] by a measurement/observation in quantum mechanical systems .darkblue[for state $|0\rangle$ and $|1\rangle$]:
] --- # .darkblue[Quantum Measurement/Observation] 2/2 .more-more-condensed[ - During observation a .darkblue[superposition state collapses to $|0\rangle$ or $|1\rangle$ according to] corresponding .darkblue[probabilities]:
] --- # .darkblue[Measurement/Observation along other axis] (here y-axis) .more-more-condensed[ - However, observation typically according to z-axis
] --- # .darkblue[Generator for True Random Numbers] .more-more-condensed[ - .darkblue[Commercially available], see e.g. -
https://www.magiqtech.com/solutions/network-security/
-
https://www.idquantique.com/random-number-generation/
] --- # .darkblue[Determining the states $(\theta,\phi)$ of identical prepared Qubits]
.darkblue[After one measurement] in one of the axis $(x, y, z)$, the .darkblue[qubit collapses to $|0_a\rangle$ or $|1_a\rangle$] with $a\in\{x, y, z\}$
.darkblue[As more identical prepared qubits are measured] in $a$ axis.darkblue[, as more] the measured distribution of $|0_a\rangle$ and $|1_a\rangle$ is getting closer to $P_{0_a}$ and $P_{1_a}\Rightarrow$ .darkblue[$\theta, \phi$ can be determined]
--- # .darkblue[No-Cloning-Theorem] of 1 Qubit .more-more-condensed.small-font[ - .darkblue[Only not perfect copying] possible of information in one of the $(x, y, z)$ axis.darkblue[, other information] of superposition .darkblue[gets lost]
] --- # Operations via .darkblue[Quantum Logic Gates] .more-more-condensed.no-margin.no-padding[ - .darkblue[quantum logic gates for 1 qubit: often rotation around one axis] - Relatively general quantum logic gate: rotation around a specified angle $\theta$:
Rotation operator for rotation around $x$-axis:
e.g. .bold[Pauli
$x$
-Gate]:
Rotation Matrix
.small-font[$NOT = \left[\\begin{array}{cc} 0 & 1 \\\\ 1 & 0 \\end{array}\right]$]
Quantum Circuit
Alternatively:
Table of in- & outputs:
$In$
$Out$
$|0\rangle$
$|1\rangle$
$|1\rangle$
$|0\rangle$
$\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)$
$\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)$
$\frac{3\cdot i}{5}|0\rangle+\frac{4}{5}|1\rangle$
$\frac{4}{5}|0\rangle+\frac{3\cdot i}{5}|1\rangle$
] --- # .darkblue[Controlled NOT (CNOT)]-Gate .more-more-condensed[ - ".em[.darkblue[If] the .darkblue[control bit] is set, .darkblue[then] it .darkblue[flips] the .darkblue[target bit].]"
Quantum Circuit
Table of in- & outputs
Rotation Matrix $R$
Inputs
Output
Control $C$
Target $T_{before}$
Target $T_{after}$
$|0\rangle$
$|0\rangle$
$|0\rangle$
$|0\rangle$
$|1\rangle$
$|1\rangle$
$|1\rangle$
$|0\rangle$
$|1\rangle$
$|1\rangle$
$|1\rangle$
$|0\rangle$
$R\cdot\frac{1}{\sqrt{2}}(|01\rangle+|11\rangle) = \frac{1}{\sqrt{2}}(|01\rangle+|10\rangle)$
$\left[\\begin{array}{cccc} 1 & 0 & 0 & 0 \\\\ 0 & 1 & 0 & 0 \\\\ 0 & 0 & 0 & 1 \\\\ 0 & 0 & 1 & 0 \\\\ \\end{array}\right]$
- .darkblue[reversible] gate: 2 applications of CNOT retrieves the original input - .darkblue[Classical analog] of the CNOT gate .darkblue[is] a .darkblue[reversible XOR] gate (i.e., they have analogous in- & and outputs for $\\{|0\rangle, |1\rangle\\}$ inputs) - $|a,b\rangle \mapsto |a,a\oplus b\rangle$, where $\oplus$ is XOR ] --- # .darkblue[Bell States via Entanglement] .reference[
Yin et al., "Satellite-based entanglement distribution over 1200 kilometers". Quantum Optics. 356: 1140–1144, 2017
] .more-more-condensed[
Entanglement
Quantum Circuit
Table of in- & outputs
Correlated
$A$
$B$
$|0\rangle$
$|0\rangle$
$|1\rangle$
$|1\rangle$
$\frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$
Anti-Correlated
$A$
$B$
$|0\rangle$
$|1\rangle$
$|1\rangle$
$|0\rangle$
$\frac{1}{\sqrt{2}}(|01\rangle + |10\rangle)$
- Even if the .darkblue[entangled qubits] are .darkblue[at different locations], they .darkblue[are still entangled $\Rightarrow$ quantum entanglement] (phenomena appears to happen .darkblue[instantaneously ignoring speed of light]: open question in physics) - As of 2017 experimentally verified for distances of up to 1200 kilometers - .darkblue[Succeeding operations on entangled qubits] do not change the state of the other entangled qubits if the operation is not a measurement ] --- # .darkblue[Digital versus Quantum Circuits] .reference[
1
The dotted square marks a superfluous gate if uncomputation to restore the B output is not required.
[Feynman, 1986]
] .more-more-condensed[
Digital Circuit
Quantum Circuit
.small-font[Building Blocks]
.small-font[Logic Gates]
.small-font[Quantum Logic Gates]
.small-font[Full Adder Example]
.small-font[consists of NAND gates]
.small-font[consists of Toffoli and CNOT gates
1
]
.small-font[In- and Output Full Adder]
Inputs
Outputs
A
B
C
in
C
out
S
0
0
0
0
0
0
0
1
0
1
0
1
0
0
1
0
1
1
1
0
1
0
0
0
1
1
0
1
1
0
1
1
0
1
0
1
1
1
1
1
.small-font[.bold[$|0\rangle$ and $|1\rangle$ as input:] Output is $|0\rangle$ and $|1\rangle$ analogous to digital circuit.
.bold[Superpositions as input:] Superpositions as output with corresponding probabilities for basic quantum states, e.g.:
]
A
B
C
in
C
out
S
$\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)$
$|0\rangle$
$|0\rangle$
.bold[ABC
out
S]: $\frac{1}{\sqrt{2}}(|0000\rangle+|1001\rangle)$
$\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)$
$|0\rangle$
$|0\rangle$
$|1\rangle$
] --- # .darkblue[Timeline of Quantum Computers] .reference[
Main Data Source
Roadmaps:
IBM
Google
Quantum Brilliance
D-Wave
#Atoms on Earth
#Particles in Universe
]
--- # .darkblue[Noisy Intermediate-Scale Quantum (NISQ)] .reference[
[P'18]
] .more-more-condensed.no-margin.darkblue[
- quantum computers with 50-100 qubits: noise in quantum gates limits the size of quantum circuits that can be executed reliably - Such NISQ devices may be able to perform tasks which surpass the capabilities of today’s classical digital computers with application areas like quantum chemistry, optimization & machine learning - 100-qubit quantum computers are (only) intermediate technologies ] --- # .darkblue[Suspected Shape of BQP] .reference[Michael Nielsen and Isaac Chuang. Quantum Computation and Quantum Information. Cambridge University Press. ISBN 0-521-63503-9. 2000] .more-mode-condensed.small-font.no-margin[
PSPACE
is the set of all decision problems that can be solved by a Turing machine using a polynomial amount of space
NP: nondeterministic polynomial time
is the set of problems that can be solved in polynomial time by a nondeterministic Turing machine
A problem is said to be
NP-hard
if everything in NP can be transformed in polynomial time into it even though it may not be in NP
A problem is
NP-complete
if it is both in NP and NP-hard
P: PTIME
contains all decision problems that can be solved by a deterministic Turing machine in polynomial time
BQP: bounded-error quantum polynomial time
is the class of decision problems solvable by a quantum computer in polynomial time, with an error probability of at most 1/3 for all instances
Note: .darkblue[Neither P≠NP nor P≠PSPACE has been proven], and if either of these are equal, the shape of BQP would be different
] --- # .darkblue[Potential of Quantum Algorithms] .more-more-condensed[ -
Quantum Algorithm Zoo
.darkgray[as example of collection of .em[important] quantum algorithms]
Covered Years
1974-today
#Investigated References
430 .darkgray.smaller-font[(visited on October 2021)]
#Algorithms
.bold.darkred[64]
Speedups
.darkred.bold[Superpolynomial: 31],
.darkred[Polynomial: 27],
.darkblue[Constant factor]: 1, .darkblue[Varies]: 3, .darkblue[Various]: 1,
.darkblue[Unknown]: 1
.legend.small-font[.bold[Terminology:]
$\alpha$: positive constant
$C(n)$: runtime of the best known classical algorithm
$Q(n)$: runtime of the quantum algorithm
Superpolynomial Speedup: $C = 2^{\Omega(Q^\alpha)}$
Polynomial Speedup: otherwise ] ] --- # Very Important Quantum Algorithms 1/2: .darkblue[Shor]'s Algorithm
1
.reference[
1
[Shor, 1994]
2
[Beckman et al., 1996]
] .more-more-condensed.no-margin[
.darkblue[factoring integers in polynomial time]
.darkblue[Depth of quantum circuit
2
] to factor integer $N$: $O((log\ N)^2 (log\ log\ N) (log\ log\ log\ N))$
superpolynomial speedup, i.e., .darkblue[almost exponentially faster than] the most efficient known .darkblue[classical factoring algorithm] (general number field sieve): $O(e^{1.9(log\ N)^{\frac{1}{3}}(log\ log\ N)^{\frac{2}{3}}})$
- Important for cryptography .darkblue[$\rightarrow$ Post-Quantum Cryptography] - Most quantum algorithms with .darkblue[superpolynomial speedup] like Shor's algorithm .darkblue[are based on quantum Fourier transforms] .darkgray[(quantum analogue of inverse discrete Fourier transform)] ] --- # Very Important Quantum Algorithms 2/2: .darkblue[Grover]'s Search Algorithm .reference[
Lov K. Grover. A fast quantum mechanical algorithm for database search. .em[STOC'96], 1996
] .more-more-condensed[ - .darkblue[Black box] function (oracle) $f:${$0,...,2^b -1$} $\mapsto$ {$true, false$} - .darkblue[Grover's search] algorithm finds one $x \in${$0,...,2^b -1$},
such that $f(x)=true$ - if there is only .darkblue[one solution]: $\frac{\pi}{4}\cdot\sqrt{2^b}$ basic steps each of which calls $f$
Let $f'(b)$ be runtime complexity of $f$ for testing $x$ to be true:
.darkblue[$\Rightarrow O(\sqrt{2^b}\cdot f'(b))$] - if there are .darkblue[$k$] possible .darkblue[solutions]: .darkblue[$O(\sqrt{\frac{2^b}{k}}\cdot f'(b))$] - .darkblue[Basis of many other quantum algorithms and applications] ] --- # .darkblue[Algorithms] .small-font30[(used e.g. in Query Optimization)] .darkblue[and their Quantum Counterparts] .more-more-condensed.small-font[
Query Optimization Approach
Basic Algorithm
Quantum Computing Counterpart
[S+79]
Dynamic Programming
[E04]
[R19]
[A+19]
[IW87]
, QA:
[TK16]
Simulated Annealing
[KGV83]
[J+11]
[MP18]
[Y+20]
[W+19]
[O+19]
Reinforcement Learning
[BSB81]
[S+21]
[DCC05]
[GPK94]
Random Walk
[BN70]
[ADZ93]
[A+01]
[BFI91]
Genetic Algorithm
[H92]
[W+13]
[TC19]
Ant Colony Optimization
[CDM91]
[DBS06]
[WNF07]
[G+20]
.legend.darkgray[This list is not complete...] - Please check my lecture about quantum computing:
https://www.ifis.uni-luebeck.de/~groppe/lectures/qc
] --- # .darkblue[Open Challenges] for QC for Databases .more-more-condensed[ - .darkblue[Are QC counterparts] of basic algorithms used in query optimizations .darkblue[suitable for speeding up databases?] - .darkblue[What should be the properties of a quantum computer] (e.g. #qubits, latencies of gates) to achieve certain speedups.darkblue[?] - .darkblue[How to combine classical and quantum computing algorithms to achieve good speedups with few qubits?]
.darkgray[(...for running database optimizations on current available quantum computers...)] - .darkblue[What other database domains] besides query optimization benefit from quantum computers.darkblue[?]
.darkgray[(In short: those based on mathematical optimization problems, but also other...?)] ] --- # .darkblue[QC4DB: .small-font36[Accelerating Relational Database Management Systems via Quantum Computing]] .more-more-condensed[ -
Project Website@Quantentechnologien
- Project .darkblue[funded by BMBF] - Duration 3 years, 1.8M Euros - Topics
.darkblue[Query Optimization]
.darkblue[Optimizing Transaction Schedules]
of an open source relational database management system - Partners - .darkblue[University of Lübeck] (Coordinator Sven Groppe) - Hardware-Acceleration of Databases - Website:
https://www.ifis.uni-luebeck.de/~groppe/
- .darkblue[Quantum Brilliance] GmbH - Room Temperature Diamond Quantum Accelerators - Website:
https://quantumbrilliance.com/
- .bold.darkred[Collaborations are welcome!] ] --- # Platform-specific .darkblue[types of DBMS]
--- # Using .darkblue[Hardware Accelerator] for optimizing Transaction Schedules .reference[
T. Bittner, S. Groppe, Avoiding Blocking by Scheduling Transactions using Quantum Annealing, IDEAS 2020
]
--- # .small-font32.bold[.darkblue[2 Phase Locking (2PL)] versus .darkblue[Strict Conservative 2PL]] .reference[
T. Bittner, S. Groppe, Avoiding Blocking by Scheduling Transactions using Quantum Annealing, IDEAS 2020
]
.more-condensed[ - .darkblue[required locks] to be determined by - .darkblue[static analysis] of transaction, .darkgray[or if static analysis is not possible:] - an .darkblue[additional phase at runtime] before transaction processing -
A. Thomson et al., "Calvin: Fast distributed transactions for partitioned database systems", SIGMOD 2012.
] --- # .em[Optimizing] .darkblue[Transaction Schedules] .reference[$^*$ M.R. Garey, D.S. Johnson and R. Sethi, The Complexity of Flowshop and Jobshop Scheduling, 1(2):117-129, 1976] .more-more-condensed[ - Variant of job shop schedule problem (JSSP): - Multi-Core CPU - Process whole
job (here transaction) on core X
- .darkblue[Schedule: $\forall$ cores: Sequence of jobs] to be processed - What is the .darkblue[optimal schedule] for minimal overall processing time? - .darkgray[Additionally to JSSP:]
.darkblue[Blocking transactions not] to be processed .darkblue[in parallel] - Example:
Black: Blocking transactions
Transaction schedule
.more-more-condensed[ - JSSP is among the .darkblue[hardest combinatorial optimizing problems]$^*$ - $\Rightarrow$ .darkblue[Hardware accelerating] the optimization of transaction schedules ]
] --- #
.darkblue[Quantum] versus .darkblue[Simulated Annealing] .reference[
T. Bittner, S. Groppe, Avoiding Blocking by Scheduling Transactions using Quantum Annealing, IDEAS 2020
]
--- # .em[Optimizing] .darkblue[Transaction Schedules] via .darkblue[Quantum Annealing] .reference[
T. Bittner, S. Groppe, Avoiding Blocking by Scheduling Transactions using Quantum Annealing, IDEAS 2020
] .no-margin.no-padding.more-more-condensed[
.more-more-condensed[ - .darkblue[Transaction Model] - T: .darkblue[set of transactions] with |T| = n - M: .darkblue[set of machines] with |M| = k - $O \subseteq T \times T$: set of .darkblue[blocking] transactions - l
i
: .darkblue[length of transaction] i - R: .darkblue[maximum execution time] - .darkblue[upper bound] r
i
= R − l
i
.darkblue[for start time of transaction] i ]
.more-more-condensed[ - Example - T = {t
1
, t
2
, t
3
}, n=3 - M = {m
1
, m
2
}, k=2 - $O$ = {(t
2
, t
3
)} - l
1
= 2, l
2
= 1, l
3
= 1 - R = 2 - r
1
= 0, r
2
= 1, r
3
= 1 ]
- .darkblue[Quadratic unconstrained binary optimization (QUBO)] problems (solving is NP-hard) - A QUBO-problem is defined by N weighted binary variables $X_1, ..., X_N\in\{0, 1\}$, either as linear or quadratic term .darkblue[to be minimized]:
] --- # .em[Optimizing] .darkblue[Transaction Schedules] via .darkblue[Quantum Annealing] .reference[
T. Bittner, S. Groppe, Avoiding Blocking by Scheduling Transactions using Quantum Annealing, IDEAS 2020
] .more-more-condensed[ - Multi-Core CPU - Process whole transaction on core X - Solution formulated as set of binary variables - X
i,j,s
is 1 iff transaction t
i
is started at time s on machine m
j
, otherwise 0 - Example:
Black: Blocking transactions
Transaction schedule
.more-more-condensed[ - Solution:
X
1,1,0
, X
3,1,2
, X
4,2,0
, X
7,2,1
, X
6,2,3
, X
5,2,6
, X
2,3,0
, X
8,3,5
]
] --- # .em[Optimizing] .darkblue[Transaction Schedules] via .darkblue[Quantum Annealing] .reference[
T. Bittner, S. Groppe, Avoiding Blocking by Scheduling Transactions using Quantum Annealing, IDEAS 2020
] .more-more-condensed[ - .darkblue[Valid] Solution - A: each
transaction starts exactly once
] --- # .em[Optimizing] .darkblue[Transaction Schedules] via .darkblue[Quantum Annealing] .reference[
T. Bittner, S. Groppe, Avoiding Blocking by Scheduling Transactions using Quantum Annealing, IDEAS 2020
] .more-more-condensed[ - .darkblue[Valid] Solution - B:
transactions cannot be executed at the same time on the same machine
] --- # .em[Optimizing] .darkblue[Transaction Schedules] via .darkblue[Quantum Annealing] .reference[
T. Bittner, S. Groppe, Avoiding Blocking by Scheduling Transactions using Quantum Annealing, IDEAS 2020
] .more-more-condensed[ - .darkblue[Valid] Solution - C:
transactions that block each other cannot be executed at the same time
] --- # .em[Optimizing] .darkblue[Transaction Schedules] via .darkblue[Quantum Annealing] .reference[
T. Bittner, S. Groppe, Avoiding Blocking by Scheduling Transactions using Quantum Annealing, IDEAS 2020
] .more-more-condensed[ - .darkblue[Optimal] Solution - D:
minimizing the maximum execution time
- Increasing weights: Weight of step n is larger than of
all preceding steps 1 to n-1 $\Rightarrow$
prefer
ring
transactions ending earlier
- Weigths in A, B and C $\geq$ 1
$\Rightarrow$
first priority is validity
, second priority is optimality
] --- # .em[Optimizing] .darkblue[Transaction Schedules] via .darkblue[Quantum Annealing] .reference[
T. Bittner, S. Groppe, Avoiding Blocking by Scheduling Transactions using Quantum Annealing, IDEAS 2020
] .more-more-condensed[ - .darkblue[Overall] Solution - Minimize $P = A + B + C + D$
] --- # .em[Optimizing] .darkblue[Transaction Schedules] via .darkblue[Quantum Annealing] .reference[
T. Bittner, S. Groppe, Avoiding Blocking by Scheduling Transactions using Quantum Annealing, IDEAS 2020
] .more-more-condensed[
.more-more-condensed[ - Experiments on real .darkblue[Quantum Annealer] (D-Wave 2000Q cloud service) - first minute free
(afterwards too much for our budget) - Versus .darkblue[Simulated Annealing on CPU] - .darkblue[Preprocessing time/Number of QuBits]: $O((n\cdot k\cdot R)^2)$ ]
] --- # .darkblue[Pipelining] for further Speedup .reference[
T.Bittner,S.Groppe, Hardware Accelerating the Optimization of Transaction Schedules via Quantum Annealing by Avoiding Blocking,OJCC 7(1)
]
--- # .darkblue[Caching of & Reusing] generated formulas to minimize preprocessing time .reference[
T.Bittner,S.Groppe, Hardware Accelerating the Optimization of Transaction Schedules via Quantum Annealing by Avoiding Blocking,OJCC 7(1)
] .more-more-condensed[ - .darkblue[Following parameters are fixed:] - .darkblue[the number $k$ of machines] (system does not change during runtime) - .darkblue[the number $n$ of transactions] (for batches of the same size) - .darkblue[We observe:] - The (maximal) execution time .darkblue[$R$ and hence] upper bounds of start times .darkblue[$r_i, ..., r_n$ depend on the lengths of the transactions], - the formulas .darkblue[$A$, $B$ and $D$ depend on] the fixed parameters .darkblue[$k$ and $n$, and on the lengths of the transactions], and - the formula .darkblue[$C$ is a sum of sub-formulas depending on $k$ and the lengths of blocking transactions as well as the identifiers of blocking transactions].
$\Rightarrow$ .darkblue[Caching $A$, $B$ and $D$, and sub-formulas of $C$] with the key of the lengths of the transactions (orderd by lengths) (Example: using $(1,1,2)$ as key)
Further information in paper! ] --- # .darkblue[Optimizing Transaction Schedules] via .darkred.bold[Quantum Computing] .reference[
S. Groppe, J. Groppe: Optimizing Transaction Schedules on Universal Quantum Computers via Code Generation for Grover’s Search Algorithm. IDEAS'21
]
--- # .darkblue[Grover]'s Search Algorithm
.more-more-condensed[ - .darkblue[Black box] function $f:${$0,...,2^b -1$} $\mapsto$ {$true, false$} - Grover's search algorithm finds one $x \in${$0,...,2^b -1$},
such that $f(x)=true$ - if there is only .darkblue[one solution]: $\frac{\pi}{4}\cdot\sqrt{2^b}$ basic steps each of which calls $f$
Let $f'(b)$ be runtime complexity of $f$ for testing $x$ to be true:
.darkblue[$\Rightarrow O(\sqrt{2^b}\cdot f'(b))$] - if there are .darkblue[$k$] possible .darkblue[solutions]: .darkblue[$O(\sqrt{\frac{2^b}{k}}\cdot f'(b))$] ] --- # .darkblue[Motivation] - Quadratic Speedup .reference[Grover' Search:
Original Paper
Qiskit Textbook
$k$ sol.
in ArXiv
Unknown Number of Solutions:
Randomized
in ArXiv
Deterministic
]
.more-more-condensed.smaller-font[
$N$
Linear
Search
$k=1$
Grover
$k=1$
$k=\frac{5}{100}\cdot N$
$k=5$
known $k$
unknown $k$
known $k$
unknown $k$
randomized
deterministic
randomized
deterministic
10
5
2.48
3.51
10.06
37.46
1.11
3.81
11.85
100
50
7.85
3.51
10.06
37.47
1000
500
24.84
11.11
31.82
118.48
1000 000
500 000
785.40
351.24
1006.23
3746.57
] --- # .darkblue[Grover's Search for $k$ Solutions] .reference[Grover' Search:
Original Paper
Qiskit Textbook
$k$ solutions
in ArXiv
]
--- # .darkblue[Grover's Search for Unknown Number of Solutions] .reference[
Scott Aaronson. Introduction to Quantum Information Science Lecture Notes, 2021
] .more-more-condensed[ - If you apply .darkblue[Grover's search with $k\approx$ number of solutions $k'$, then] there is a .darkblue[high probability for success] - .darkblue[Several ways for unknown $k$:] - .darkblue[Successively applying Grover's search with $k=N, \frac{N}{2}, \frac{N}{4}, ..., \frac{N}{2^t}$] until solution is found -
Runtime
complexity: With sufficiently high probability, a marked entry will be found by iteration $t=\log_{2}(\frac{N}{k'})+c$ for some constant $c$
$\Rightarrow$ #iterations $\leq\frac{\pi}{4}\left(1+\sqrt{2}+\sqrt{4}+...+\sqrt{\frac{N}{k'\cdot 2^c}}\right)=O\left(\sqrt{\frac{N}{k'}}\right)$
- .darkblue[Next slide: .bold[Randomized] version with $\frac{9}{4}\sqrt{\frac{N}{k'}}$ iterations]... - These .darkblue[methods need to be called several times] in case of not finding a solution in preceding calls - The .darkblue[probability for success is] high, but .darkblue[never 100%] ] --- # .darkblue[Grover's Search for Unknown Number of Solutions] - Silq code .reference[Grover' Search:
Original Paper
Qiskit Textbook
$k$ sol.
in ArXiv
Unknown Number of Solutions:
Randomized
in ArXiv
] .smaller-font[ ```silq // Popular Lehmer generator that uses the prime modulus 2^32−5 def random(state:!ℕ):(!ℕ)×(!ℚ) { upperlimit := (2^32 - 5); newstate := (state · 279470273) % upperlimit; newstateQ := newstate as !ℚ; // for the following division to get a rational number return (newstate, newstateQ / upperlimit); } // f oracle function, t oracle function as classical function for testing the result! def grover_unknown_k[n:!ℕ](f: const uint[n] !→ lifted 𝔹, t: !ℕ !→ !𝔹, seed:!ℕ):(!ℤ)×(!ℕ) { l := 6/5; // Any value of l strictly between 1 and 4/3 would do... m := 1 as !ℝ; state := seed; // work with seed to allow for repeated function calls with other results while(true){ (zstate, z) := random(state); state = zstate; k := floor(z·m) coerce !ℕ; result := grover_k[n,k](f); if(t(result)){ // call of f would also work, but in this way hybrid approach is more visible return (result, state) as (!ℤ)×(!ℕ); } if(m>=sqrt(2^n)){ return (-1, state) as (!ℤ)×(!ℕ); } // different from cited paper: restart! m = min(l·m, sqrt(n)); } }```] --- # .darkblue[Optimal Runtime Complexity of Grover's Search] .reference[Proof of Optimality:
$k=1$
in ArXiv
Any $k$
in ArXiv
] .more-more-condensed[ - .darkblue[Grover's algorithm for $k=1$ and any $k$: optimal up to sub-constant factors] - Any algorithm that accesses the database only by using the oracle must apply the oracle at least a $1-o(1)$ fraction as many times as Grover's algorithm ] --- # .darkblue[Grover's Search as Basic Algorithm Used in other Approaches] .more-more-condensed[ - Solving the .darkblue[collision problem] - Finding .darkblue[Minimum] - .darkblue[Dynamic Programming] - Solving .darkblue[NP-complete problems] by performing exhaustive searches over the set of possible solutions - results in quadratic speedup over classical solutions - but no polynomial-time solution for NP-complete problems because exponential speedup is
not
reached - Example: $k$-SAT - ... ] --- # .darkblue[Applying Grover] - Finding .darkblue[Minimum] .reference[adapted from:
C. Dürr, P. Høyer. A quantum algorithm for finding the minimum, 1996
] .more-more-condensed[ - Given function $f:\\{0,...,N-1\\} \mapsto ℝ$ - Algorithm to find minimal $f(x)$: 1. Choose randomly $x'\in N$ 2. Threshold $t := f(x')$ 3. while(true)
a) $r :=$ Grover's Search for unknown $k$ with oracle $f(x)\lt t$
b) if$\left(f(r)\lt t\right)$ $t:=f(r)$ else return $t$ - Runtime Complexity: $O\left(\frac{45}{4}\sqrt{N}+\frac{7}{10}lg^2(N)\right)$
] --- # .darkblue[Applying Grover] - Finding .darkblue[Minimum] .more-more-condensed[ - Variants: - .darkblue[Application-oriented]: -
Estimate
good
initial threshold $t$
, then continue original algorithm at 3. with threshold $t$ - Example (see also next lecture unit): - Transactions $T_1,...,T_p$ to be distributed to $m$ cores of a CPU - Total runtime $l=\sum_{i=1}^p |T_i|$ of transactions - Threshold $t\geq\frac{l}{m}$ for max. runtime on all cores - In some applications, the number $k$ of solutions of the oracle can be approximately estimated and used to speed up Grover's search - .darkblue[Domain-oriented]:
I) If given domain $[start, end]$ is "small", then continue original algorithm at 3. with $t:=end$
II) $m:=\frac{end-start}{2}$
III) If Grover's search with oracle $f(x)\lt m$ finds a solution $r$, then continue at I) with domain $[start,r]$ else with $[m+1,end]$
] --- # .darkblue[Overview] of Optimizing Transaction Schedules via Quantum Computing
--- # .darkblue[Encoding Scheme] .small-font36[of Transaction Schedules]
.more-more-condensed[ - $29 =$ .darkgreen[$000111$] .darkred[$01$] $_{binary} \equiv$ Core 0 .darkgreen[$[3,1]$] .darkred[$\mu_1=1$] .darkgreen[$[0,2]$] Core 1, some bits for .darkgreen[permutation] and some for .darkred[separators] - $b = (m-1)\cdot \left \lceil log_2(n-1)\right \rceil + \left \lceil log_2(n!-1)\right \rceil$ ] --- # Generated .darkblue[Black Box] Function .more-more-condensed[ - Quantum computation: .darkblue[circuit of quantum logic gates
$\Rightarrow$ circuit is generated] dependent on the concrete problem instance - Sketch of algo: .smaller-font[
1. Determine Separators and Permutation
$O(m+n)$
2. Check Validity of Separators
$O(m)$
3. $\forall i$: Determine lengths of $i$-th transaction in permutation
$O(n\cdot log_2(n))$ with decision tree over transaction number
4. Check: Which separator configuration? For current case:
$O(n)$
4a. determine total runtime of core and check if it's below given limit
$O(n)$
4a. determine start and end times of conflicting transactions
$O(n\cdot log_2(min(n,c))+c)$ with decision tree over conflicting transactions (for $n>>c$) or transaction numbers (for $c>>n$)
5. Check: Do conflicting transactions overlap?
$O(c)$
.darkblue[$\sum:O(n\cdot log_2(n)+c)$]
]] --- # .darkblue[Complexity Analysis] .more-more-condensed.smaller-font[
Approach
CPU
Quantum Computer
Quantum Annealing
Preprocessing
$O(1)$
$O(n^2\cdot c)$
$O(m\cdot R^2\cdot(c\cdot m + n^2))$
Execution
$O(\frac{(m+n-1)!}{(m-1)!}\cdot (n+c))$
$O(\sqrt{\frac{n!\cdot n^m}{k}}\cdot(n\cdot log_2(n)+c))$
$O(1)$
Space
$O(n+m+c)$
$O((n+m)\cdot log_2(n))$
$O(m\cdot R^2\cdot(c\cdot m + n^2))$
Code
$O(1)$
$O(n^2\cdot c)$
$O(m\cdot R^2\cdot(c\cdot m + n^2))$
.bold[$m$:] number of machines .bold[$n$:] number of transactions .bold[$c$:] number of conflicts .bold[$R$:] max. runtime .bold[$k$:] number of solutions
] --- # .darkblue[Number of Solutions]
.more-more-condensed.smaller-font[
$m=2$
$m=4$
$N$
8,589,934,592
2,199,023,255,552
$k$
48,384,000
559,872
$k$ for
$\leq 1.25\cdot R_{opt}$
1,472,567,040
2,047,306,752
]
--- # .darkblue[Summary & Conclusions] .more-more-condensed[ - .darkblue[Scheduling transactions as variant of jobshop problem with] additionally considering .darkblue[blocking transactions] - .darkblue[Hard combinatorial optimization problem $\Rightarrow$ hardware acceleration] - .darkblue[Enumeration of all possible transaction schedules] for finding an optimal one - .darkblue[Hardware acceleration via quantum .bold[annealing]] - Formulating
transaction schedule problem as
quadratic unconstrained binary optimization (
QUBO
)
problem
-
Constant execution time
in contrast to simulated annealing on classical computers
-
Preprocessing time
increasing with larger problem sizes - .darkblue[.bold[Grover]'s search]: $\approx$ .darkblue[quadratic speedup] on Universal Quantum Computers -
Estimation of number of solutions for
a further
speedup
- Estimation of speedup for suboptimal solutions being a guaranteed factor away from optimal solution -
Code Generator
available at
https://github.com/luposdate/OptimizingTransactionSchedulesWithSilq
]