Özlem Salehi
22.08.2022
Quantum annealing
QAOA
Zhou, Leo, et al. "Quantum approximate optimization algorithm: Performance, mechanism, and implementation on near-term devices." Physical Review X 10.2 (2020): 021067.
Follows the adiabatic evolution defined through time-dependent Hamiltonian
\(H(t) =(1-\frac{t}{\tau}) \:H_{\rm mix} + \frac{t}{\tau}\: H_c\)
Slow evolution during time \(\tau\)
Quantum Adiabatic Theorem: A quantum system that starts in the ground state of a time-dependent Hamiltonian, remains in the in the instantaneous ground state provided the Hamiltonian changes sufficiently slowly.
Implemented by D-Wave quantum annealers
Some conditions of AQC are relaxed in QA resulting in a heuristic algorithm
Express your problem as a
Quadratic
Unconstrained
Binary
Optimatization
problem
Obtain the equivalent Ising model
Use QA to find the variable assignment that minimizes energy
Travelling Salesman with Time Windows
Music generation
Music reduction
Test vehicle optimization
Railway dispatching problem
Travelling Salesman with Time Windows
Constraints
Objective
Salehi, Özlem, Adam Glos, and Jarosław Adam Miszczak. "Unconstrained binary models of the travelling salesman problem variants for quantum optimization." Quantum Information Processing 21.2 (2022): 1-30.
Aim: Find a closed route with minimum cost that visit each city exactly once obeying each city's time window.
Each city should be visited exactly once
Only a single city should be visited at each time point
Objective
Penalty method
One-hot encoding
\(O(n^3+n\delta)\) variables
\(O(n^2+n\delta)\) variables
but not a QUBO
\(O(n^2+n^2\delta)\) variables
1.
2.
3.
\(x^1_{0,2}= 1\)
\(x^2_{2,5}= 1\)
\(x^3_{5,1}= 1\)
\(x^4_{1,3}= 1\)
\(x^5_{3,4}= 1\)
\(x^6_{4,0}= 1\)
\(i=1\)
\(i=2\)
\(i=3\)
\(i=4\)
\(i=5\)
\(i=6\)
Undesired solution
\(x^1_{0,2}=1\)
\(x^2_{2,5}=1\)
\(x^3_{5,1}=1\)
\(x^4_{1,3}=1\)
\(x^5_{3,4}=1\)
\(x^6_{4,0}=1\)
Edge-based
ILP
Travelling Salesman with Time Windows
Music generation
Music reduction
Test vehicle optimization
Railway dispatching problem
Music generation
Aim: Generate a melodic sequence of pitches
Pitches
that is plausible to the ear!
How to formulate this as an optimization process?
Arya, A., Botelho, L., Cañete, F., Kapadia, D., & Salehi, Ö. (2022). Music Composition Using Quantum Annealing. arXiv preprint arXiv:2201.10557.
$$\sum_{j \in P} x_{i,j} = 1$$
$$\left ( 1- \sum_{j \in P} x_{i,j} \right )^2$$
Pitches
Rules about consecutive notes
$$x_{i,C} + x_{i+1,D} \leq 1$$
$$x_{i,C} + x_{i+1,C} + x_{i+2,C} \leq 2 $$
$$P=\{p_1,p_2,\dots,p_k \}$$
\(x_{i,j}\) for \(i \in [n]\) and \(j \in P\)
$$P=\{\mathtt{C}, \mathtt{D}, \mathtt{E}, \mathtt{G}\}$$
$$ -\sum_{ \substack{i\in [n-1] \\ j,j' \in P}} W_{j,j'} x_{i,j} x_{i+1,j'} $$
weights
Example: Ode to Joy excerpt
$$W_{F\#4,E4} = 2 $$
$$W_{F\#4,F\#4} = 2$$
$$W_{F\#4,G4} = 1$$
Travelling Salesman with Time Windows
Music generation
Music reduction
Test vehicle optimization
Railway dispatching problem
Music reduction
Aim: Given a music piece with T tracks, obtain a new music with M<T tracks keeping the characteristics of the song as much as possible
Cambouropoulos, Emilios. "The local boundary detection model (LBDM) and its application in the study of expressive timing." In ICMC, p. 8. 2001.
Phrase Identification
Phrases with more information should be selected \(\implies\) larger entropy
No two overlapping phrases should be selected for the same track
Operational fixed job scheduling
The gap between selected phrases in the same track should be minimized
Operational fixed job scheduling with minimal idle-time
job number
time
16
18
15
10
10
14
23
17
26
job number
time
job number
time
$$x_{i} =\begin{cases}1,& \text{if the job $b_i$ is selected}\\ 0, & \text{otherwise.}\end{cases} $$
$$\text{minimize: } \ - \sum_{j=1}^{N} w_ix_i$$
$$\sum_{i: ~ k\in[s_i,e_i]} x_i \leq M \qquad \text{for $k = 0, \dots, K$ } $$
\(M\): Number of machines
\(N\): Number of jobs
\(K\): Total time in discrete time units
\(s_i\): Start time of job \(b_i\)
\(e_i\): End time of job \(b_i\)
$$\sum_{i: ~ k\in[s_i,e_i]} x_i = M \qquad \text{for $k = 0, \dots, K$ } $$
$$ P_1 \sum_{k=1}^K \left(\sum_{i: ~ k\in[s_i,e_i]} x_i - M\right)^2 + P_2 \sum_{k=1}^K \left(\sum_{i: ~ k\in[s_i,e_i]} x_i + E(\xi_k) - M\right)^2 + \sum_{i=1}^N w_ix_i , $$
Sort selected jobs according to their ending times
Use greedy algorithm to assign jobs to tracks
Travelling Salesman with Time Windows
Music generation
Music reduction
Test vehicle optimization
Railway dispatching problem
Test vehicle optimization
Glos, Adam, Akash Kundu, and Özlem Salehi. "Optimizing the Production of Test Vehicles using Hybrid Constrained Quantum Annealing." arXiv preprint arXiv:2203.15421 (2022).
Aim: Given a list of tests, requiring cars with certain features find the minimum number of cars that cover the tests and obey the configuration rules
Vehicle configuration rules
Single type requirement
Features allowed per type
Group Features
Rules per type
Test requirements
Properties of the cars needed for the testing phase
Greedy approach
(1) CQM solver natively supports equality and inequality constraints.
(2) Less number of variables: As no need to remove inequality constraints through penalty method.
(3) Allows quadratic constraints directly into model, which is not possible for QUBO.
Constrained Quadratic Model
Advantages
(1) CQM solver natively supports equality and inequality constraints.
(2) Less number of variables: As no need to remove inequality constraints through penalty method.
(3) Allows quadratic constraints directly into model, which is not possible for QUBO.
Main challenge: Express the logical constraints as equality and inequality constraints using as few variables as possible
CBC: 62
Gurobi: 64
CQM: 66
\(n=1\): One car optimized at a time
Travelling Salesman with Time Windows
Music generation
Music reduction
Test vehicle optimization
Railway dispatching problem
Railway dispatching problem
Domino, Krzysztof, et al. "Quadratic and higher-order unconstrained binary optimization of railway dispatching problem for quantum computing." arXiv preprint arXiv:2107.03234 (2021).
Aim: Reduce delay propagation in railway systems in case of disruptions by rescheduling and rerouting
Objective: Minimize weighted additional delay
Constraints reflect minimal headway between trains, minimal stay on stations, station/track occupation, and rolling stock circulation on double-track and multi-track lines.
ILP
HOBO
QUBO
changing the track to the parallel one
changing the platform at the station
changing the path within the station
Zhou, Leo, et al. "Quantum approximate optimization algorithm: Performance, mechanism, and implementation on near-term devices." Physical Review X 10.2 (2020): 021067.
For the gate based model
\(\gamma_i\) and \(\beta_i\) optimized by external classical procedure
$$|\gamma,\beta\rangle = \prod_{i=1}^p \exp(-\mathrm{i} \beta_iH_{\rm mix})\exp(-\mathrm{i} \gamma_iH_c) |+^n\rangle $$
Can be viewed as a trotterization of AQC
$$|\gamma,\beta\rangle = \prod_{i=1}^p \exp(-\mathrm{i} \beta_iH_{\rm mix})\exp(-\mathrm{i} \gamma_iH_c) |+^n\rangle $$
Typical initial state
\(-\sum_i X_i\) s.t. eigenstate of \(X\) is \(|+\rangle\)
\(2p\) parameters required for \(p\) layers
Expectation \(\langle \gamma,\beta| H_c | \gamma, \beta \rangle \) is approximated by measurement in the computational basis
$$|\gamma,\beta\rangle = \prod_{i=1}^p \exp(-\mathrm{i} \beta_iH_{\rm mix})\exp(-\mathrm{i} \gamma_iH_c) |s\rangle $$
Subspace of the full Hilbert space containig all feasible states
Should preserve the space
Example: One-hot states and XY Mixer
Botelho, L., Glos, A., Kundu, A., Miszczak, J. A., Salehi, Ö., & Zimborás, Z. (2022). Error mitigation for variational quantum algorithms through mid-circuit measurements. Physical Review A, 105(2), 022441.
Ideally, quantum state of the system should be a superposition of valid states throughout the evolution.
For TSP with ordinary encoding, product of one-hot states
Idea: Detect and remove unvalid states during the evolution
If \(|s\rangle\) is not a valid state, ancilla will no longer be in \(|0\cdots0\rangle\) state
\(\implies\) Measure ancilla and continue if it is all 0
1000, 1100, 1110, 1111
For one-hot states, apply the conversion circuit from one-hot to binary
Check if bits are 0
Larger the value, the more positive impact the mitigation scheme has on the output.
We introduce an alternative way for implementing QAOA that allows reaching near-optimal cost metrics
Idea: Start with a classical pseudo-code function and implement it using a quantum circuit
State of the art
\(b_i \leftarrow \frac{1-s_i}{2}\)
Start with a
QUBO or HOBO
Get the corresponding Ising model
Implement each term in the expression
\(H = -\frac{1}{2^n} \prod_{i=1}^n (1-s_i)\)
\(s_i \in \{-1,1\}\)
\(b_i \leftarrow \frac{1-s_i}{2}\)
\(H = -\prod_{i=1}^n b_i\)
\(b_i \in \{0,1\}\)
Exponential number of CNOT gates!
Exponential number of terms !
\(H = -\frac{1}{2^n} \prod_{i=1}^n (1-s_i)\)
\(s_i \in \{-1,1\}\)
\(O(n^2)\) gates on LNN!
FUNC-QAOA
This is classical AND operator!
\(H = -\prod_{i=1}^n b_i\)
\(b_i \in \{0,1\}\)
Start with a pseudocode function!
\(|f\rangle \leftarrow AND(b_i\) for \(i=1\) to \(n\))
\(|f\rangle \leftarrow R_z(-i\theta) |f \rangle \)
Uncompute \(|f\rangle \)
Quality Measures
Claim: FUNC-QAOA allows near-optimal circuit designs for various problems
Mixer: Grover-mixer
Initial state: Product of equal superposition of valid cities
Encoding: Binary
Each \(b_t\) (which represents in binary city visited at time \(t\)) is initialized as the equal superposition of valid cities
Idea:
Count occurrence of each city in modulo 2
If they are not all 1, penalize
Idea:
Switch from time-to-city to city-to city representation
The idea can be generalized, so far we managed to use it for
Very difficult for general graph!
Credits for presentation: Ludmila Botelho, Akash Kundu, Adam Glos
1. Salehi, Ö., Glos, A., & Miszczak, J. A. (2022). Unconstrained binary models of the travelling salesman problem variants for quantum optimization. Quantum Information Processing, 21(2), 1-30.
2. Arya, A., Botelho, L., Cañete, F., Kapadia, D., & Salehi, Ö. (2022). Music Composition Using Quantum Annealing. arXiv preprint arXiv:2201.10557.
3. Glos, A., Kundu, A., & Salehi, Ö. (2022). Optimizing the Production of Test Vehicles using Hybrid Constrained Quantum Annealing. arXiv preprint arXiv:2203.15421.
4. Domino, K., Kundu, A., Salehi, Ö., & Krawiec, K. (2021). Quadratic and higher-order unconstrained binary optimization of railway dispatching problem for quantum computing. arXiv preprint arXiv:2107.03234.
5. Botelho, L., Glos, A., Kundu, A., Miszczak, J. A., Salehi, Ö., & Zimborás, Z. (2022). Error mitigation for variational quantum algorithms through mid-circuit measurements. Physical Review A, 105(2), 022441.