Skip to main content

Learning Based Hardware-Centric Quantum Circuit Generation

  • Conference paper
  • First Online:
Innovations for Community Services (I4CS 2022)

Abstract

In this paper we present an approach to find quantum circuits suitable to mimic probabilistic and search operations on a physical NISQ device. We present both a gradient based and a non-gradient based machine learning approach to optimize the created quantum circuits. In our optimization procedure we make use of a cost function that differentiates between the vector representing the probabilities of measurement of each basis state after applying our learned circuit and the desired probability vector. As such our quantum circuit generation (QCG) approach leads to thinner quantum circuits which behave better when executed on physical quantum computers. Our approach moreover ensures that the created quantum circuit obeys the restrictions of the chosen hardware. By catering to specific quantum hardware we can avoid unforeseen and potentially unnecessary circuit depth, and we return circuits that need no further transpilation. We present the results of running the created circuits on quantum computers by IBM, Rigetti and Quantum Inspire.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Here the term ansatz refers to the initial layout of the quantum circuit in terms of which gate is applied to which qubit in each layer.

  2. 2.

    An example of this is the Hadamard gate H. There are multiple textbook decompositions into rotation operations, all requiring 3 rotations, an example is \(H = e^{\frac{i\pi }{2}} R_Z \left( \frac{\pi }{2}\right) R_X \left( \frac{\pi }{2} \right) R_Z \left( \frac{\pi }{2} \right) \). When the application of H is followed by a measurement in the computational basis, however, it suffices to apply \(\tilde{H} = R_Z \left( \frac{\pi }{2}\right) R_X \left( \frac{\pi }{2}\right) \) to the qubits instead.

  3. 3.

    The Hamming weight of a binary vector equals the amount of nonzero indices.

  4. 4.

    An observable is a Hermitian matrix, multiplying a Hermitian matrix from both sides with some unitary V results in a Hermitian matrix \(Q = V^\dag \hat{Z}V\). In this case, since \(\hat{Z}_i = \mathinner {\left| {i}\right. \rangle }\mathinner {\left\langle {i}\right| }\) we get \(\hat{Q}_i=V^\dag \hat{Z}_iV = \mathinner {\left| {\xi }\right. \rangle }\mathinner {\left\langle {\xi }\right| }\), where \(\mathinner {\left| {\xi }\right. \rangle }\) is some quantum state.

References

  1. IBM Quantum (2021). https://quantum-computing.ibm.com/

  2. Smith, R.S., Curtis, M.J., Zeng, W.J.: A practical quantum instruction set architecture (2016)

    Google Scholar 

  3. QuTech: Quantum Inspire Home. Retrieved from Quantum Inspire (2018). https://www.quantum-inspire.com/

  4. Paszke, A., et al.: PyTorch: an imperative style, high-performance deep learning library (2019)

    Google Scholar 

  5. Bergholm, V., et al.: PennyLane: automatic differentiation of hybrid quantum-classical computations (2020)

    Google Scholar 

  6. Miranda, L.J.V.: PySwarms: a research toolkit for Particle Swarm Optimization in Python. J. Open Sour. Softw. 3, 433 (2018)

    Article  Google Scholar 

  7. Adarsh, S., Möller, M.: Resource optimal executable quantum circuit generation using approximate computing (2021)

    Google Scholar 

  8. Khatri, S., LaRose, R., Poremba, A., Cincio, L., Sornborger, A.T., Coles, P.J.: Quantum-assisted quantum compiling. Quantum 3, 140 (2019)

    Article  Google Scholar 

  9. Cincio, L., Rudinger, K., Sarovar, M., Coles, P.J.: Machine learning of noise-resilient quantum circuits (2020)

    Google Scholar 

  10. Davis, M.G., Smith, E., Tudor, A., Sen, K., Siddiqi, I., Iancu, C.: Heuristics for quantum compiling with a continuous gate set (2019)

    Google Scholar 

  11. Benedetti, M., et al.: A generative modeling approach for benchmarking and training shallow quantum circuits (2019)

    Google Scholar 

  12. Zhu, D., et al.: Training of quantum circuits on a hybrid quantum computer (2019)

    Google Scholar 

  13. Liu, J.-G., Wang, L.: Differentiable learning of quantum circuit born machine (2018)

    Google Scholar 

  14. Martinez, E.A., Monz, T., Nigg, D., Schindler, P., Blatt, R., et al.: Compiling quantum algorithms for architectures with multi-qubit gates. New J. Phys. 18, 063029 (2016)

    Article  Google Scholar 

  15. Nielsen, M., Chuang, I.: Quantum computation and quantum information (2000)

    Google Scholar 

  16. Preskill, J.: Quantum computing in the NISQ era and beyond. Quantum J. 2, 79 (2018)

    Article  Google Scholar 

  17. Abrams, D.M., Didier, N., Johnson, B.R., da Silva, M.P., Ryan, C.A.: Implementation of the XY interaction family with calibration of single pulse (2019)

    Google Scholar 

  18. Murali, P., Linke, N.M., Martonosi, M., Abhari, A.J., Nguyen, N.H., Alderete, C.H.: Full-stack, real-system quantum computer studies: architectural comparisons and design insights (2019)

    Google Scholar 

  19. Schuld, M., Bergholm, V., Gogolin, C., Izaac, J., Killoran, N.: Evaluating analytic gradients on quantum hardware (2018)

    Google Scholar 

  20. Banchi, L., Crooks, G.E.: Measuring analytic gradients of general quantum evolution with the stochastic parameter shift rule (2021)

    Google Scholar 

  21. Goodfellow, I., Bengio, Y., Courville, A.: Deep learning (2016)

    Google Scholar 

  22. McClean, J.R., Boixo, S., Smelyanskiy, V.N., Babbush, R., Neven, H.: Barren plateaus in quantum neural network training landscapes (2018)

    Google Scholar 

  23. Grover, L.K.: A fast quantum mechanical algorithm for database search (1996)

    Google Scholar 

Download references

Acknowledgment

This research used resources of the Oak Ridge Leadership Computing Facility, which is a DOE Office of Science User Facility supported under Contract DE-AC05-00OR22725. We also wish to express our gratitude to IBM and Quantum Inspire for making their quantum computers available online for public use. Furthermore the authors thank David de Laat for his useful ideas, fruitful discussions and valuable feedback on the manuscript.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Merel A. Schalkers .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Schalkers, M.A., Möller, M. (2022). Learning Based Hardware-Centric Quantum Circuit Generation. In: Phillipson, F., Eichler, G., Erfurth, C., Fahrnberger, G. (eds) Innovations for Community Services. I4CS 2022. Communications in Computer and Information Science, vol 1585. Springer, Cham. https://doi.org/10.1007/978-3-031-06668-9_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-06668-9_22

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-06667-2

  • Online ISBN: 978-3-031-06668-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics