Skip to main content
Log in

Error-mitigated data-driven circuit learning on noisy quantum hardware

  • Research Article
  • Published:
Quantum Machine Intelligence Aims and scope Submit manuscript

Abstract

Application-level benchmarks measure how well a quantum device performs meaningful calculations. In the case of parameterized circuit training, the computational task is the preparation of a target quantum state via optimization over a loss landscape. This is complicated by various sources of noise, fixed hardware connectivity, and generative modeling, the choice of target distribution. Gradient-based training has become a useful benchmarking task for noisy intermediate-scale quantum computers because of the additional requirement that the optimization step uses the quantum device to estimate the loss function gradient. In this work, we use gradient-based data-driven circuit learning to qualitatively evaluate the performance of several superconducting platform devices and present results that show how error mitigation can improve the training of quantum circuit Born machines with 28 tunable parameters.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

References

  • Aleksandrowicz G, Alexander T, Barkoutsos P, Bello L, Ben-Haim Y, Bucher D, Cabrera-Hernádez FJ, Carballo-Franquis J, Chen A, Chen CF, Chow JM, Córcoles-Gonzales A D, Cross AJ, Cross A, Cruz-Benito J, Culver C, González SDLP, Torre EDL, Ding D, Dumitrescu E, Duran I, Eendebak P, Everitt M, Sertage IF, Frisch A, Fuhrer A, Gambetta J, Gago BG, Gomez-Mosquera J, Greenberg D, Hamamura I, Havlicek V, Hellmers J, Herok Ł, Horii H, Hu S, Imamichi T, Itoko T, Javadi-Abhari A, Kanazawa N, Karazeev A, Krsulich K, Liu P, Luh Y, Maeng Y, Marques M, Martín-Fernández FJ, McClure DT, McKay D, Meesala S, Mezzacapo A, Moll N, Rodríguez DM, Nannicini G, Nation P, Ollitrault P, O’Riordan LJ, Paik H, Pérez J, Phan A, Pistoia M, Prutyanov V, Reuter M, Rice J, Davila AR, Rudy RHP, Ryu M, Sathaye N, Schnabel C, Schoute E, Setia K, Shi Y, Silva A, Siraichi Y, Sivarajah S, Smolin JA, Soeken M, Takahashi H, Tavernelli I, Taylor C, Taylour P, Trabing K, Treinish M, Turner W (2019) Vogt-Qiskit: an open-source framework for quantum computing. https://doi.org/10.5281/zenodo.2562110

  • Benedetti M, Garcia-Pintos D, Perdomo O, Leyton-Ortega V, Nam Y, Perdomo-Ortiz A (2019) A generative modeling approach for benchmarking and training shallow quantum circuits. npj Quantum Inf 5(1):45

    Article  Google Scholar 

  • Bialczak RC, Ansmann M, Hofheinz M, Lucero E, Neeley M, O’Connell A, Sank D, Wang H, Wenner J, Steffen M et al (2010) Quantum process tomography of a universal entangling gate implemented with josephson phase qubits. Nat Phys 6(6):409

    Article  Google Scholar 

  • Coyle B, Mills D, Danos V, Kashefi E (2019) The Born supremacy: quantum advantage and training of an Ising Born machine. arXiv:190402214

  • Endo S, Benjamin SC, Li Y (2018) Practical quantum error mitigation for near-future applications. Phys Rev X 8(3):031,027

    Google Scholar 

  • Hamilton KE, Dumitrescu EF, Pooser RC (2019) Generative model benchmarks for superconducting qubits. Phys Rev A 99(6):062,323

    Article  Google Scholar 

  • Harrow AW, Hassidim A, Lloyd S (2009) Quantum algorithm for linear systems of equations. Physical Review Letters 103(15). https://doi.org/10.1103/PhysRevLett.103.150502

  • Havlíček V, Córcoles AD, Temme K, Harrow AW, Kandala A, Chow JM, Gambetta JM (2019) Supervised learning with quantum-enhanced feature spaces. Nature 567(7747):209

  • Kandala A, Mezzacapo A, Temme K, Takita M, Brink M, Chow JM, Gambetta JM (2017) Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets. Nature 549(7671):242

    Article  Google Scholar 

  • Kandala A, Temme K, Córcoles AD, Mezzacapo A, Chow JM, Gambetta JM (2019) Error mitigation extends the computational reach of a noisy quantum processor. Nature 567:491–495. https://doi.org/10.1038/s41586-019-1040-7

  • Kingma DP, Ba J (2014) Adam: a method for stochastic optimization. arXiv:14126980

  • Leyton-Ortega V, Perdomo-Ortiz A, Perdomo O (2019) Robust implementation of generative modeling with parametrized quantum circuits. arXiv:190108047

  • Li Y, Benjamin SC (2017) Efficient variational quantum simulator incorporating active error minimization. Phys Rev X 7(2):021,050

    Google Scholar 

  • Liu JG (2018a) QCBM code repository. https://github.com/GiggleLiu/QuantumCircuitBornMachine

  • Liu JG, Wang L (2018b) Differentiable learning of quantum circuit Born machines. Phys Rev A 98(6):062,324

    Article  MathSciNet  Google Scholar 

  • Mitarai K, Negoro M, Kitagawa M, Fujii K (2018) Quantum circuit learning. Phys Rev A 98(3):032,309

    Article  Google Scholar 

  • Mohamed S, Lakshminarayanan B (2016) Learning in implicit generative models. arXiv:161003483

  • Potok TE, Schuman C, Young S, Patton R, Spedalieri F, Liu J, Yao KT, Rose G, Chakma G (2018) A study of complex deep learning networks on high-performance, neuromorphic, and quantum computers. ACM J Emerg Technol Comput Syst 14(2):19:1–19:21. https://doi.org/10.1145/3178454

  • Schuld M, Bergholm V, Gogolin C, Izaac J, Killoran N (2019) Evaluating analytic gradients on quantum hardware. Phys Rev A 99(3):032,331

    Article  Google Scholar 

  • Temme K, Bravyi S, Gambetta JM (2017) Error mitigation for short-depth quantum circuits. Phys Rev Lett 119(18):180,509

    Article  MathSciNet  Google Scholar 

  • Theis L, Oord Avd, Bethge M (2015) A note on the evaluation of generative models. arXiv:151101844

Download references

Acknowledgments

The authors would like to thank Ryan Bennink for helpful discussions about matrix-based error mitigation methods, Eugene Dumitrescu for general comments about error mitigation, Vicente Leyton-Ortega for general discussions about DDCL, and Nathan Wiebe for informative discussions about noisy channel coding.

This work was supported as part of the ASCR Quantum Testbed Pathfinder Program at Oak Ridge National Laboratory under FWP #ERKJ332. This research used quantum computing system resources of the Oak Ridge Leadership Computing Facility, which is a DOE Office of Science User Facility supported under Contract DE-AC05-00OR22725. Oak Ridge National Laboratory manages access to the IBM Q System as part of the IBM Q Network.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kathleen E. Hamilton.

Ethics declarations

Conflict of interests

The authors declare that they have no conflict of interest.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This manuscript has been authored by UT-Battelle, LLC, under Contract No. DE-AC0500OR22725 with the US Department of Energy. The US Government retains and the publisher, by accepting the article for publication, acknowledges that the US Government retains a non-exclusive, paid-up, irrevocable, worldwide license to publish or reproduce the published form of this manuscript, or allow others to do so, for the US Government purposes. The Department of Energy will provide public access to these results of federally sponsored research in accordance with the DOE Public Access Plan.

Appendices

Appendix A: Mitigation SWAP gate noise

The motivation behind the design of circuit-specific MFM is to attempt to capture additional noise and errors outside of the measurement error. In Sections 35, we saw that using the circuit-specific MFM to post-process a measured distribution often led to lower values of the Kullback-Leibler metric compared to the more general, hardware MFM and lower MMD values during training.

In the main text, we discussed circuits with sparse entangling layers, trained on hardware with connectivity that supports the gate layout. The dC = 3 circuit was trained on 3-qubit devices (ibmq_boeblingen, ibmq_valencia, ibmq_20_tokyo) but the dC = 2 circuit was only trained on ibmq_20_tokyo. The sparsity of the entangler layers and the optimization with hardware layout is designed to reduce the overall amount of 2-qubit gate noise by reducing the number of noisy gates in a compiled circuit. The compiled circuits executed on hardware in the main text had the minimum number of CNOTs (4 and 6, for dC = 2 and dC = 3 respectively).

If a circuit is executed on hardware that does not exactly match the hardware coupler layout, then additional CNOTs will be added to the compiled circuit. We tested the efficacy of EM for noise associated with added CNOTs by running the same experiments from Section 4 using a dC = 2 circuit on ibmq_boeblingen. On ibmq_20_tokyo, the compiled circuit contained only 4 CNOT gates, but on ibmq_boeblingen. the compiled circuit could have up to 16 CNOT gates. The dC = 2 circuit was trained for 20 steps of Adam with BAS(2,2) as the target.

Now, circuits trained with \(\mathbb {K}_{hw}\) or \(\mathbb {K}_{circ}\) in training shows no substantial improvement in the MMD loss minimization, and in Fig. 13, we see that the inclusion of EM in training can significantly impair the minimization of \({{\mathcal{L}}_{MMD}}\). The \(\min \limits {({\mathcal{L}}_{MMD})}\) measured was 0.0332, 0.033, and 0.0281 for , and \(\mathbb {K}_{circ}\), respectively, which is far higher than the minimum value found during noiseless simulation \(\min \limits {[{\mathcal{L}}_{MMD}])} = 0.0045\). Yet post-processing did show improvement in the Kullback-Leibler metric (reported in Table 9). In the main text, we observed a lowest value of \(\min \limits {\langle D(P|Q) \rangle }= 0.0763\) for a dC = 2 circuit trained on ibmq_20_tokyo. Now on ibmq_boeblingen with additional CNOTs the lowest value of \(\min \limits {\langle D(P|Q) \rangle }= 0.1490\). Figure 13 shows interesting behavior for the value of \(\min \limits {\langle D(P|Q) \rangle }\) post-processed with EM. At the end of the training, the metric is significantly higher than the noiseless simulation, but there are points where the KL value post-processed with \(\mathbb {K}_{circ}\) closely matches the noiseless simulation. A simple explanation for this discrepancy is that the additional CNOT noise impairs the gradient-based training causing it to leave a local minima at step 16. Our EM method cannot compensate for this significantly higher level of gate noise associated with the additional CNOT. This was also observed in the main text (see Fig. 6)—if the training gets trapped in a poor local minima this cannot be corrected simply through post-processing (Fig. 14).

Fig. 13
figure 13

\({{\mathcal{L}}_{MMD}}\) for a dC = 2 circuit during 20 steps of training with Adam on ibmq_boeblingen, with BAS(2,2) as target and 3 MFM in training. (left) Measured on T0 for (black, circles, dotted), \(\mathbb {K}_{hw}\) (red, squares, solid), and \(\mathbb {K}_{circ}\) (blue, diamonds, dashed). (right) Measured on T1 for (black, circles, dotted), \(\mathbb {K}_{hw}\) (red, squares, solid), and \(\mathbb {K}_{circ}\) (blue, diamonds, dashed)

Table 9 \(\min \limits {\langle D(P|Q)\rangle }\) values observed in post-processed data for dC = 2 circuits trained on ibmq_boeblingen
Fig. 14
figure 14

D(P|Q)〉 for dC = 2 circuit trained on ibmq_boeblingen with BAS(2,2) as target and 20 steps of Adam with identity-MFM in training. Averaged over 10 sub-samples of (left) 4096 shots, (center) 2048 shots, (right) 512 shots. The scores are post-processed with: no error mitigation (black, circles), hardware-MFM mitigation (red, square) and circuit-MFM mitigation (blue, diamonds)

Appendix B: Measurement fidelity matrix construction

Our approach to error mitigation is a generalization of the measurement fidelity matrices used in previous studies (Bialczak et al. 2010; Kandala et al. 2017), but instead of constructing the matrix from 1-qubit errors, we extract the error correlations from the output of multi-qubit circuits executed on localized qubit subsets. For a system of N qubits, a set of 2N quantum circuits is used to prepare each individual state of the computational basis.

\(\mathbb {K}_{hw}\) only mitigate readout errors and is generated row-wise using shallow circuits of N qubits and up to N individual X gates. We extended this MFM construction method to a more general structure so we can estimate the general error associated with a particular parameterized circuit. We constructed the matrices \(\mathbb {K}_{circ}\) used in the main text using the general circuit ansatz of Fig. 1. Example of the circuits used to construct \(\mathbb {K}_{hw}\) and \(\mathbb {K}_{circ}\) are shown in Fig. 15.

Fig. 15
figure 15

(Left) Example of a circuit used to construct a row of \(\mathbb {K}_{hw}\). (Right) Example of a circuit used to construct a row of \(\mathbb {K}_{circ}\)

Since we project the final state prepared by the circuit onto a set of real-valued amplitudes, there are multiple sets of rotational parameters that will result in the same final distribution. The rotational parameters in Rotation Layer 1 and Rotation Layer 3 are all set to 𝜃 = 0 such that both layers are effectively implementing identity gates. Each qubit in Rotation Layer 2 has a gate sequence RZ(𝜃i)RX(𝜃j)RZ(𝜃k) applied to it. By replacing this gate sequence with either RZ(0)RX(0)RZ(0) or RZ(−π/2)RX(−π)RZ(−π/2), we can use the parameterized ansatz to prepare any basis state. For example, applying RZ(0)RX(0)RZ(0) to all 4 qubits will return only the state |0000〉 in the absence of noise.

When deployed on noisy hardware, we can again construct an MFM that quantifies the probability of the target state being prepared, and the probabilities of other states being prepared. In Section 5, we calculated the Frobenius norm of the difference matrix and showed that \(\mathbb {K}_{circ}\) matrices are much farther from the identity matrix than \(\mathbb {K}_{hw}\) matrices. The final MFM is assumed to be invertible and non-negative, but we note that the matrix is not symmetric. Additionally, the individual state fidelities are not uniform. For 3 MFM generated on the same day on the same set of qubits, we report the individual basis state fidelities in Table 10.

Table 10 Individual state fidelities for dC = 2, dC = 3 \(\mathbb {K}_{circ}\) and \(\mathbb {K}_{hw}\) all evaluated at PB on ibmq_20_tokyo

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Hamilton, K.E., Pooser, R.C. Error-mitigated data-driven circuit learning on noisy quantum hardware. Quantum Mach. Intell. 2, 10 (2020). https://doi.org/10.1007/s42484-020-00021-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s42484-020-00021-x

Keywords

Navigation