Skip to main content

Tools for Quantum and Reversible Circuit Compilation

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 10301))

Abstract

We present tools for resource-aware compilation of higher-level, irreversible programs into lower-level, reversible circuits. Our main focus is on optimizing the memory footprint of the resulting reversible networks. We discuss a number of examples to illustrate our compilation strategy for problems at scale, including a reversible implementation of hash functions such as SHA-256, automatic generation of reversible integer arithmetic from irreversible descriptions, as well as a test-bench of Boolean circuits that is used by the classical Circuits and Systems community. Our main findings are that, when compared with Bennett’s original “compute-copy-uncompute”, it is possible to reduce the space complexity by 75% or more, at the price of having an only moderate increase in circuit size as well as in compilation time. Finally, we discuss some emerging new paradigms in quantum circuit synthesis, namely the use of dirty ancillas to save overall memory footprint, probabilistic protocols such as the RUS framework which can help to reduce the gate complexity of rotations, and synthesis methods for higher-dimensional quantum systems.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.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

Learn about institutional subscriptions

Notes

  1. 1.

    In quantum computing literature, such subroutines are often implementing “oracles”.

  2. 2.

    Indeed, the only non-Toffoli gates in the quantum circuit presented in [24] are single qubit Hadmard gates, single qubit phase rotations, and single qubit measurements. The vast majority of other gates in the circuit form one big circuit component which can be classically simulated and tested.

References

  1. Federal information processing standards publication 180–2, 2002. See also the Wikipedia entry. http://en.wikipedia.org/wiki/SHA-2

  2. Abdessaied, N., Amy, M., Drechsler, R., Soeken, M.: Complexity of reversible circuits and their quantum implementations. Theor. Comput. Sci. 618, 85–106 (2016)

    Article  MathSciNet  MATH  Google Scholar 

  3. Amy, M., Maslov, D., Mosca, M., Roetteler, M.: A meet-in-the-middle algorithm for fast synthesis of depth-optimal quantum circuits. IEEE Trans. Comput. Aided Des. Integr. Circ. Syst. 32(6), 818–830 (2013)

    Article  Google Scholar 

  4. Amy, M., Di Matteo, O., Gheorghiu, V., Mosca, M., Parent, A., Schanck, J.M.: Estimating the cost of generic quantum pre-image attacks on SHA-2 and SHA-3. IACR Cryptol. ePrint Arch. 2016, 992 (2016)

    Google Scholar 

  5. Barenco, A., Bennett, C.H., Cleve, R., DiVincenzo, D.P., Margolus, N., Shor, P., Sleator, T., Smolin, J.A., Weinfurter, H.: Elementary gates for quantum computation. Phys. Rev. A 52(5), 3457 (1995)

    Article  Google Scholar 

  6. Bennett, C.H.: Logical reversibility of computation. IBM J. Res. Dev. 17, 525–532 (1973)

    Article  MathSciNet  MATH  Google Scholar 

  7. Bennett, C.H.: Time/space trade-offs for reversible computation. SIAM J. Comput. 18, 766–776 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  8. Berry, D.W., Childs, A.M., Cleve, R., Kothari, R., Somma, R.D.: Exponential improvement in precision for simulating sparse hamiltonians. In: Symposium on Theory of Computing (STOC 2014), pp. 283–292 (2014)

    Google Scholar 

  9. Berry, D.W., Childs, A.M., Kothari, R.: Hamiltonian simulation with nearly optimal dependence on all parameters. In: IEEE 56th Annual Symposium on Foundations of Computer Science (FOCS), pp. 792–809 (2015)

    Google Scholar 

  10. Bocharov, A., Cui, S.X., Kliuchnikov, V., Wang, Z.: Efficient topological compilation for weakly-integral anyon model. Phys. Rev. A 93, 012313 (2016)

    Article  Google Scholar 

  11. Bocharov, A., Cui, S.X., Roetteler, M., Svore, K.M.: Improved quantum ternary arithmetics. Quantum Inf. Comput. 16(9&10), 862–884. arXiv preprint (2016). arXiv:1512.03824

  12. Bocharov, A., Roetteler, M., Svore, K.M.: Efficient synthesis of probabilistic quantum circuits with fallback. Phys. Rev. A 91, 052317 (2015)

    Article  Google Scholar 

  13. Bocharov, A., Roetteler, M., Svore, K.M.: Efficient synthesis of universal repeat-until-success circuits. Phys. Rev. Lett. 114, 080502. arXiv preprint (2015). arXiv:1404.5320

  14. Bocharov, A., Roetteler, M., Svore, K.M.: Factoring with qutrits: Shor’s algorithm on ternary and metaplectic quantum architectures. arXiv preprint (2016). arXiv:1605.02756

  15. Chrzanowska-Jeske, M., Mishchenko, A., Perkowski, M.A.: Generalized inclusive forms - new canonical reed-muller forms including minimum esops. VLSI Des. 2002(1), 13–21 (2002)

    Article  MathSciNet  Google Scholar 

  16. Clader, B.D., Jacobs, B.C., Sprouse, C.R.: Preconditioned quantum linear system algorithm. Phys. Rev. Lett. 110, 250504 (2013)

    Article  Google Scholar 

  17. Cuccaro, S.A., Draper, T.G., Kutin, S.A., Moulton, D.P.: A new quantum ripple-carry addition circuit. arXiv preprint (2004). arXiv:quant-ph/0410184

  18. Draper, T.G.: Addition on a quantum computer. arXiv preprint (2000). arXiv:quant-ph/0008033

  19. Fowler, A.G., Mariantoni, M., Martinis, J.M., Cleland, A.N.: Surface codes: towards practical large-scale quantum computation. Phys. Rev. A 86, 032324 (2012). arXiv:1208.0928

  20. Gidney, C.: StackExchange: creating bigger controlled nots from single qubit, toffoli, and CNOT gates, without workspace (2015)

    Google Scholar 

  21. Green, A.S., Lumsdaine, P.L.F., Ross, N.J., Selinger, P., Valiron, B.: An introduction to quantum programming in quipper. In: Dueck, G.W., Miller, D.M. (eds.) RC 2013. LNCS, vol. 7948, pp. 110–124. Springer, Heidelberg (2013). doi:10.1007/978-3-642-38986-3_10

    Chapter  Google Scholar 

  22. Green, A.S., Lumsdaine, P.L., Ross, N.J., Selinger, P., Valiron, B.: Quipper: a scalable quantum programming language. In: Proceedings of Conference on Programming Language Design and Implementation (PLDI 2013). ACM (2013)

    Google Scholar 

  23. Grover, L.: A fast quantum mechanical algorithm for database search. In: Proceedings of the Symposium on Theory of Computing (STOC 1996), pp. 212–219. ACM Press (1996)

    Google Scholar 

  24. Häner, T., Roetteler, M., Svore, K.M. Factoring using \(2n{+}2\) qubits with Toffoli based modular multiplication. arXiv preprint (2016). arXiv:1611.07995

  25. Aram, W., Harrow, A.H., Lloyd, S.: Quantum algorithm for linear systems of equations. Phys. Rev. Lett. 103(15), 150502 (2009)

    Article  MathSciNet  Google Scholar 

  26. Heckey, J., Patil, S., JavadiAbhari, A., Holmes, A., Kudrow, D., Brown, K.R., Franklin, D., Chong, F.T., Martonosi, M.: Compiler management of communication and parallelism for quantum computation. In: Proceedings of the Twentieth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS 2015), pp. 445–456. ACM (2015)

    Google Scholar 

  27. Kempe, J.: Quantum random walks - an introductory overview. Contemporary Phys. 44(4), 307–327 (2003)

    Article  Google Scholar 

  28. Kliuchnikov, V., Maslov, D., Mosca, M.: Practical approximation of single-qubit unitaries by single-qubit quantum Clifford and \(T\) circuits. IEEE Trans. Comput. 65(1), 161–172 (2016)

    Article  MathSciNet  MATH  Google Scholar 

  29. Maslov, D.: On the advantages of using relative phase Toffolis with an application to multiple control Toffoli optimization. Phys. Rev. A 93, 022311 (2016)

    Article  Google Scholar 

  30. Mishchenko, A., Brayton, R.K., Chatterjee, S.: Boolean factoring and decomposition of logic networks. In: Proceedings of the IEEE/ACM International Conference on Computer-Aided Design, pp. 38–44. IEEE Press (2008)

    Google Scholar 

  31. Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2000)

    MATH  Google Scholar 

  32. Oemer, B.: Classical concepts in quantum programming. Int. J. Theor. Phys. 44(7), 943–955 (2005)

    Article  MathSciNet  Google Scholar 

  33. Paetznick, A., Svore, K.M.: Repeat-until-success: non-deterministic decomposition of single-qubit unitaries. Quantum Inf. Comput. 4(15&16), 1277–1301 (2014)

    MathSciNet  Google Scholar 

  34. Parent, A., Roetteler, M., Svore, K.M.: Reversible circuit compilation with space constraints. arXiv preprint (2015). arXiv:1510.00377

  35. Ross, N.J., Selinger, P.: Optimal ancilla-free Clifford+T approximation of z-rotations. arXiv preprint (2014). arXiv:403.2975

  36. Selinger, P.: Quantum circuits of \(T\)-depth one. Phys. Rev. A 87, 042302 (2013)

    Article  Google Scholar 

  37. Selinger, P.: Efficient Clifford\(+T\) approximation of single-qubit operators. Quantum Inf. Comput. 15(1–2), 159–180 (2015)

    MathSciNet  Google Scholar 

  38. Shor, P.W.: Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM J. Comput. 26(5), 1484–1509 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  39. Takahashi, Y., Tani, S., Kunihiro, N.: Quantum addition circuits, unbounded fan-out. arXiv preprint (2009). arXiv:0910.2530

  40. Wecker, D., Svore, K.M.: LIQ Ui\(|\rangle \): a software design architecture and domain-specific language for quantum computing. arXiv preprint arXiv:1402.4467

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Martin Roetteler .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Roetteler, M. (2017). Tools for Quantum and Reversible Circuit Compilation. In: Phillips, I., Rahaman, H. (eds) Reversible Computation. RC 2017. Lecture Notes in Computer Science(), vol 10301. Springer, Cham. https://doi.org/10.1007/978-3-319-59936-6_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-59936-6_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-59935-9

  • Online ISBN: 978-3-319-59936-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics