Abstract
In this paper we study a possible compiler for a high-level imperative programming language for quantum computation, the quantum Guarded-Command Language (qGCL). It is important because it liberates us from thinking of quantum algorithms at the data-flow level, in the same way as happened for standard computation a few decades ago.
We make use of the normal-form approach to compiler design, introduced by Hoare, Jifeng and Sampaio. In this approach a source program is transformed, by means of algebraic manipulations, into a particular form which can be directly executed by a target machine. This entails the definition of a simple quantum hardware architecture, derived from Hoare et al.’s computing model.
Our work provides a general framework for the construction of a compiler for qGCL, focusing mainly on the correctness of the design. Here we do not deal with other topics such as efficiency of compiled code, factorisation of unitary transformations and compilation of quantum data structures.
Similar content being viewed by others
References
Barenco, A.: A universal two-bit gate for quantum computation. Proc. Roy. Soc. Lond. A 449, 679–683 (1995)
Barenco, A. et al.: Elementary gates for quantum computation. Phys. Rev. A 52(5), 3457–3467 (1995)
Beckman, D., Chari, A., Devabhaktuni, S., Preskill, J.: Efficient networks for quantum factoring. Phys. Rev. A 54(2), 1034 (1996)
Bowen, J., Jifeng, H., Page, I.: Hardware compilation. In: Bowen, J. (ed.), Towards Verified Systems, Chap. 10, pp. 193–207. Elsevier, Amsterdam (1994)
Deutsch, D.: Quantum computational networks. Proc. Roy. Soc. Lond. A 425, 73–90 (1989)
Deutsch, D., Barenco, A., Ekert, A.: Universality in quantum computation. Proc. Roy. Soc. Lond. A 449, 669–677 (1995)
Dijkstra, E.W.: Guarded commands, nondeterminacy and the formal derivation of programs. CACM 18, 453–457 (1975)
Feynman, R.P.: Simulating physics with computers. Int. J. Theor. Phys. 21(6/7), 467–488 (1982)
Feynman, R.P.: Quantum mechanical computers. Found. Phys. 16(6), 507–531 (1986)
Hoare, C., Jifeng, H., Sampaio, A.: Normal form approach to compiler design. Acta Inform. 30, 701–739 (1993)
Isham, C.J.: Lectures on Quantum Theory. Imperial College Press, London (1997)
Jifeng, H., McIver, A., Seidel, K.: Probabilistic models for the guarded command language. Sci. Comput. Progr. 28, 171–192 (1997)
McIver, A., Morgan, C.: Partial correctness for probabilistic demonic programs. Technical report, Oxford University Computing Laboratory. Acta Inform. (in press)
Mitchison, G., Jozsa, R.: Counterfactual computation. Proc. Roy. Soc. Lond. A 457, 1175–1193 (2001)
Morgan, C.: Programming from Specifications. Prentice-Hall, Englewood Cliffs, NJ (1994)
Morgan, C., McIver, A.: pGCL: formal reasoning for random algorithms. South African Comput. J. 22, 14–27 (1999)
Morgan, C., McIver, A., Seidel, K.: Probabilistic predicate transformers. ACM Trans. Progr. Lang. Sys. 18(3), 325–353 (1996)
Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2000)
Page, I.: Constructing hardware-software systems from a single description. J. VLSI Signal Process. 12(1), 87–107 (1996)
Reed, M., Simon, B.: Methods of Mathematical Physics. I: Functional Analysis. Acamedic, New York (1972)
Sanders, J.W., Zuliani, P.: Quantum Programming. Math. Progr. Construct. Springer LNCS 1837, 80–99 (2000)
Schumacher, B.: Quantum coding. Phys. Rev. A 51(4), 2738–2747 (1995)
von Neumann, J.: Mathematical Foundations of Quantum Mechanics. Princeton University Press, Princeton, NJ (1955)
Wootters, W.K., Zurek, W.H.: A single quantum cannot be cloned. Nature 299(5886), 802–803 (1982)
Yokonuma, T.: Tensor Spaces and Exterior Algebra. American Mathematical Society, Providence, RI (1992)
Zuliani, P.: Formal reasoning for quantum mechanical nonlocality. Technical Report RR-01-05, Oxford University Computing Laboratory (in press). Available at http://web.comlab.ox.ac.uk/oucl/research/areas/probs/bibliography.html
Zuliani, P.: Logical reversibility. IBM J. Res. Dev. 45(6), 807–818 (2001)
Zuliani, P.: Quantum Programming. PhD Thesis, Oxford University Computing Laboratory (2001). Available at http://www.comlab.ox.ac.uk
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Zuliani, P. Compiling quantum programs. Acta Informatica 41, 435–474 (2005). https://doi.org/10.1007/s00236-005-0165-3
Received:
Revised:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00236-005-0165-3