HW 1.2 Solution in The Prof. Paper
HW 1.2 Solution in The Prof. Paper
HW 1.2 Solution in The Prof. Paper
net/publication/338138135
CITATIONS READS
0 159
15 authors, including:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Anton Frisk Kockum on 01 January 2020.
Andreas Bengtsson,1 Pontus Vikstål,1 Christopher Warren,1 Marika Svensson,2, 3 Xiu Gu,1
Anton Frisk Kockum,1 Philip Krantz,1 Christian Križan,1 Daryoush Shiri,1 Ida-Maria Svensson,1
Giovanna Tancredi,1 Göran Johansson,1 Per Delsing,1 Giulia Ferrini,1 and Jonas Bylander1, ∗
1
Microtechnology and Nanoscience, Chalmers University of Technology, SE-412 96, Göteborg, Sweden
2
Computer Science and Engineering, Chalmers University of Technology, SE-412 96, Göteborg, Sweden
3
Jeppesen, SE-411 03, Göteborg, Sweden
(Dated: December 24, 2019)
Present-day, noisy, small or intermediate-scale quantum processors—although far from fault-
tolerant—support the execution of heuristic quantum algorithms, which might enable a quantum
advantage, for example, when applied to combinatorial optimization problems. On small-scale
arXiv:1912.10495v1 [quant-ph] 22 Dec 2019
Quantum computing promises exponential computa- instance, the exact-cover problem can provide feasible
tional speedup in a number of fields, such as cryptography, solutions to airline planning problems such as tail assign-
quantum simulation, and linear algebra [1]. Even though ment [17]. Currently, this is solved by well-developed op-
a large, fault-tolerant quantum computer is still many timization techniques in combination with heuristics. By
years away, impressive progress has been made over the leveraging heuristic quantum algorithms such as QAOA,
last decade using superconducting circuits [2–4], leading the current approach can be augmented and might provide
to the noisy intermediate-scale quantum (NISQ) era [5]. high-quality solutions while reducing the running time.
It was predicted that NISQ devices should allow for “quan- Applying QAOA to instances of the exact-cover problem
tum supremacy” [6], that is, solving a problem that is extracted from real-world data in the context of the tail
intractable on a classical computer in a reasonable time. assignment has been numerically studied with 25 qubits,
This was recently demonstrated on a 53-qubit processor by corresponding to 25 routes and 278 flights [18]. Other
sampling the output distributions of random circuits [7]. quantum algorithms for solving the exact-cover problem,
Two of the most prominent NISQ algorithms are the specifically quantum annealing, have been considered in
quantum approximate optimization algorithm (QAOA), Refs. [19–21].
for combinatorial optimization problems [8–10], and the All NP-complete problems can be formulated in terms
variational quantum eigensolver (VQE), for the calcula- of finding the ground state of an Ising Hamiltonian [22].
tion of molecular energies [11–13]. QAOA is a heuristic QAOA aims at finding this state by applying two non-
algorithm that could bring a polynomial speedup to the commuting Hamiltonians, B̂ and Ĉ, in an alternating
solution of specific problems encoded in a quantum Hamil- sequence (with length p) to an equal superposition state
tonian [14, 15]. Moreover, QAOA should produce output of n qubits [visualized in Fig. 1(a)],
distributions that cannot be efficiently calculated on a p h i |0i + |1i ⊗n
classical computer [16].
Y
~ =
|~γ , βi e −iβi B̂ −iγi Ĉ
e , (1)
QAOA is a hybrid algorithm, as it is executed on both i=1
2
a classical and a quantum computer. The quantum part
consists of a circuit with p levels, where better approxima- where γi and βi are (real) variational angles. The first
tions to the solution of the encoded problem are generally Hamiltonian in the sequence is the Ising (cost) Hamilto-
achieved with higher p. In this Letter, we report on using nian specifying the problem,
our superconducting quantum processor to demonstrate n
QAOA with up to p = 2, enabled by adequately high
X X
Ĉ = hi σ̂iz + Jij σ̂iz σ̂jz , (2)
gate fidelities. We solve instances of the NP-complete i=1 i<j
exact-cover problem with 96.6% success probability. For
p > 1, the QAOA solution cannot be efficiently calculated and the second is a transverse field (mixing) Hamiltonian
on a classical computer, as the computational complexity defined by
scales doubly exponentially in p [8].
n
Our interest in solving the exact-cover problem orig-
X
B̂ = σ̂ix , (3)
inates from its use in many real-world applications, for i=1
2
β1
costly pre-compilation (e.g., calculating the final circuit π/2 0.50
unitary and using Cartan decomposition to minimize the
Cost F (γ1 , β1 )
0.25
number of two-qubit gates). 0
Our quantum processor is fabricated using the same pro- π (c)
0.00
(d)
cesses as in Ref. [24] and consists of two fixed-frequency −0.25
transmon qubits with individual control and readout.
−0.50
β1
Both qubits are coupled to a common frequency-tunable π/2
F P|00i P|10i P|01i P|11i TABLE II. Comparison between different optimizers. We
run QAOA for problem A over 200 iterations with random
1 (a) (b) starting parameters. We extract the convergence probability
for reaching a cost below -0.95, the average number of function
calls required to reach that level, and the highest achieved
F, P
0
probability of measuring the problem solution (P|10i ).
Optimizer Convergence Function calls P|10i
−1
BGP 61.5% 44 ± 16 96.5%
Nelder-Mead 20.0% 38 ± 13 96.3%
1 CMA-ES 49.5% 121 ± 46 96.6%
F, P
0
number of call is kept low. However, for more optimiza-
−1 (c) (d) tion parameters (higher p), the performance of BGP is
generally decreased due to an increasing need for classical
0 π/2 π 0 π/2 π
computation. CMA-ES, on the other hand, excels when
β1 β1
the number of parameters are high, and thus might be a
good optimizer for QAOA with tens or hundreds of pa-
FIG. 3. A comparison between experiment (open circles) and rameters. Here, with just four parameters, CMA-ES has a
theory (solid lines) for four exact-cover problems using QAOA convergence-probability similar to that of BGP, although
with p = 1. Each color (given at the top) corresponds to with a greater number of function calls on average.
either a state probability or the value of the cost function As Bayesian optimization performs best, we study its
F . The four panels (a-d) correspond to the four problems
(A-D) in Table I. The linecuts are taken at the vertical dashed
individual optimization trajectories in Fig. 4. For each
lines in Fig. 2. The theory curves are calculated assuming run, we plot the cost F and the success probability P|10i ,
an ideal quantum processor, whereas each experimental data along with their average over all converged runs. The first
point is derived from the average of 5000 measurements on function calls are random points, thus explaining why
our quantum processor. there is no improvement in the beginning. After that,
the cost function decreases rapidly, accompanied by an
expected increase in P|10i . We see an indication of a local
Bayesian optimization with Gaussian processes (BGP), minimum at F ≈ −0.5, and that the optimizer sometimes
Nelder-Mead, and covariance matrix adaptation evolution manages to escape from this minimum, showcasing the
strategy (CMA-ES). We choose BGP due to its ability to strength of Bayesian optimization. A comparison between
find global minima, Nelder-Mead due to it being common all three optimizers is found within the Supplementary
and simple, and CMA-ES due to its favorable scaling with Material [29].
the number of optimization parameters. At the end of the optimization, the highest recorded
We evaluate the optimizer performances by running 200 probability of generating the correct state is 96.6%. The
independent optimizations with random starting values success probability is limited by imperfect gates (we have
~ ∈ [0, π[) for each optimizer. We set a threshold
(~γ , β verified that an ideal quantum computer and p = 2 can
for convergence at F < −0.95 and count the number of achieve P|10i = 1). We compare our measured success
converged optimization runs as well as the number of probability to what we would expect from the randomized-
calls to the quantum processor (function calls) required benchmarking fidelities. The quantum circuit for p = 2
to converge. We also record the success probability of consists of 6 X, 4 Hadamard, 4 Z, and 3 CZ gates, which,
measuring the problem solution (P|10i ). The results are when multiplied together with the fidelities for each gate,
summarized in Table II. predicts a total fidelity of 96.3%, in good agreement with
We observe that the success probabilities after con- the measured fidelity considering experimental uncertain-
vergence are similar for all three optimizers. However, ties (e.g., fluctuations in qubit coherence and gate fideli-
there is a difference in convergence probability, of which ties). Note that p = 3 would not yield a higher success
BGP has the highest and Nelder-Mead has the lowest. probability, since adding more gates would lower the total
The lower performance of Nelder-Mead is most likely due fidelity further (predicted to be 94.2%).
to its sensitivity to local minima, a well-known problem In conclusion, we have implemented the quantum ap-
for most optimizers. In contrast, one of the strengths of proximate optimization algorithm with up to p = 2 levels.
Bayesian optimization is its ability to find global min- Using a superconducting quantum processor with state-
ima, which could explain why it performs better than of-the-art performance, we successfully optimized four
Nelder-Mead and CMA-ES. Additionally, Bayesian opti- instances of the exact-cover problem. For the non-trivial
mization is designed to handle optimization where the instance (problem A), we used p = 2 and black-box opti-
time of each function call is high (costly), such that the mization to reach a success probability to 96.6% (up from
5
(2017).
0.0
[10] G. Pagano et al., arXiv preprint arXiv:1906.02700 (2019).
[11] A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q.
−0.5 Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. O’Brien,
Nature Communications 5, 4213 (2014).
[12] P. J. O’Malley et al., Physical Review X 6, 031007 (2016).
−1.0 [13] A. Kandala, A. Mezzacapo, K. Temme, M. Takita,
0 20 40 60 80 100
M. Brink, J. M. Chow, and J. M. Gambetta, Nature
Function call 549, 242 (2017).
[14] Z. Jiang, E. G. Rieffel, and Z. Wang, Physical Review A
95, 062317 (2017).
FIG. 4. QAOA for problem A using p = 2 and Bayesian opti-
[15] M. Y. Niu, S. Lu, and I. L. Chuang, arXiv preprint
mization with Gaussian processes. We run the optimization
arXiv:1905.12134 (2019).
200 times with random starting parameters. Plotted as blue
[16] E. Farhi and A. W. Harrow, arXiv preprint
lines are the individual optimization trajectories for the cost
arXiv:1602.07674 (2016).
F . In orange and green are F and the success probability
[17] M. Grönkvist, The Tail Assignment Problem, Ph.D. the-
(P|10i ) averaged over the converged runs.
sis, Chalmers University of Technology and Göteborg
University (2005).
[18] P. Vikstål, M. Grönkvist, M. Svensson, M. Andersson,
50% with p = 1), in good agreement with a prediction G. Johansson, and G. Ferrini, To be published (2019).
from our gate fidelities. Even if many more qubits are [19] E. Farhi, J. Goldstone, S. Gutmann, J. Lapan, A. Lund-
needed to solve problems that are intractable for classical gren, and D. Preda, Science 292, 472 (2001).
computers, algorithmic performance serves as a critical [20] H. Wang and L.-A. Wu, Scientific reports 6, 22307 (2016).
[21] T. Graß, Physical Review Letters 123, 120501 (2019).
quantum-processor benchmark since performance can be
[22] A. Lucas, Frontiers in Physics 2, 5 (2014).
much lower than what individual gate fidelities predicts. [23] V. Choi, arXiv preprint arXiv:1004.2226 (2010).
Although further experiments with larger devices are [24] J. J. Burnett, A. Bengtsson, M. Scigliuzzo, D. Niepce,
needed to explore if QAOA can have an advantage over M. Kudra, P. Delsing, and J. Bylander, npj Quantum
classical algorithms, our results show that QAOA can be Information 5, 9 (2019).
used to solve the exact-cover problem. [25] D. C. McKay, S. Filipp, A. Mezzacapo, E. Magesan, J. M.
We are grateful to the Quantum Device Lab at ETH Chow, and J. M. Gambetta, Physical Review Applied 6,
064007 (2016).
Zürich for sharing their designs of sample holder and
[26] S. Caldwell et al., Physical Review Applied 10, 034050
printed circuit board, and Simon Gustavsson and Bruno (2018).
Küng for valuable support with the measurement infras- [27] D. C. McKay, C. J. Wood, S. Sheldon, J. M. Chow, and
tructure. We also thank Morten Kjaergaard, Devdatt J. M. Gambetta, Physical Review A 96, 022330 (2017).
Dubhashi, and Kevin Pack for insightful discussions. This [28] A. D. Córcoles, J. M. Gambetta, J. M. Chow, J. A. Smolin,
work was performed in part at Myfab Chalmers. We ac- M. Ware, J. Strand, B. L. Plourde, and M. Steffen,
knowledge financial support from the Knut and Alice Physical Review A 87, 030301 (2013).
[29] See Supplemental Material.
Wallenberg Foundation, the Swedish Research Council,
[30] K. Michielsen, M. Nocon, D. Willsch, F. Jin, T. Lippert,
and the EU Flagship on Quantum Technology H2020- and H. De Raedt, Computer Physics Communications
FETFLAG-2018-03 project 820363 OpenSuperQ. 220, 44 (2017).
∗
bylander@chalmers.se
[1] A. Montanaro, npj Quantum Information 2, 15023 (2016).
[2] G. Wendin, Reports on Progress in Physics 80, 106001
(2017).
[3] X. Gu, A. F. Kockum, A. Miranowicz, Y. X. Liu, and
F. Nori, Physics Reports 718-719, 1 (2017).
[4] M. Kjaergaard, M. E. Schwartz, J. Braumüller, P. Krantz,
J. I.-J. Wang, S. Gustavsson, and W. D. Oliver, arXiv
preprint arXiv:1905.13641 (2019).
[5] J. Preskill, Quantum 2, 79 (2018).
[6] S. Boixo, S. V. Isakov, V. N. Smelyanskiy, R. Babbush,
N. Ding, Z. Jiang, M. J. Bremner, J. M. Martinis, and
6
p0
0.6
Parameter Qubit 1 Qubit 2 Qubit 1
fR 6.17 GHz 6.04 GHz Qubit 2
f01 3.82 GHz 4.30 GHz 0.4 Reference
f12 − f01 -229 MHz -225 MHz Interleaved
j 29.1 MHz 33.0 MHz 0.2
g 53.2 MHz 56.9 MHz 100 101 102 103
T1 77 µs 55 µs
Number of cliffords
T2∗ 49 µs 82 µs
F1q 0.9986 0.9993
FCZ 0.986 FIG. 6. Randomized benchmarking of single- and two-qubit
gates. Plotted are the probability of measuring the ground
state as a function of number of Clifford gates applied. Circles
evaluations and calls external Python packages for the are data, and lines are fits to extract the gate fidelity. For
three different optimizers. All three optimizers were run qubit 1 and 2, the extracted single-qubit fidelities (averaged
over all possible single-qubit Cliffords) are 0.9986 and 0.9993.
using publicly available packages: Scikit-Optimize for
For benchmarking of the two-qubit gate, we take a reference
BGP, scipy for Nelder-Mead, and pycma for CMA-ES. (random Clifford gates) and an interleaved (a CZ gate between
each Clifford) trace to extract the CZ fidelity (0.986).