Abstract
qPCF is a paradigmatic quantum programming language that extends PCF with quantum circuits and a quantum co-processor. Quantum circuits are treated as classical data that can be duplicated and manipulated in flexible ways by means of a dependent type system. The co-processor is essentially a standard QRAM device, albeit we avoid to store permanently quantum states in between two co-processor’s calls. Despite its quantum features, qPCF retains the classic programming approach of PCF. We introduce qPCF syntax, typing rules, and its operational semantics. We prove fundamental syntactic properties of the system. Moreover, we provide some higher-order examples of circuit encoding.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Altenkirch, T., Grattage, J.: A functional quantum programming language. In: Proceedings of 20th Annual IEEE Symposium on Logic in Computer Science, pp. 249–258. IEEE Computer Society (2005)
Altenkirch, T., Grattage, J., Vizzotto, J.K., Sabry, A.: An algebra of pure quantum programming. In: QPL05, (2005). ENTCS
Arrighi, P., Diaz-Caro, A.: A system F accounting for scalars. Logical methods in computer science 8(1), (Feb 2012)
Arrighi, P., Dowek, G.: Linear-algebraic lambda-calculus: higher-order, encodings, and confluence. In: Voronkov, A. (ed.) RTA, Lecture Notes in Computer Science, vol. 5117, pp. 17–31. Springer, (2008)
Aschieri, F., Zorzi, M.: Non-determinism, non-termination and the strong normalization of system T. In: Typed Lambda Calculi and Applications, 11th International Conference, TLCA 2013, Eindhoven, The Netherlands, 26–28 June 2013. Proceedings, Lecture Notes in Computer Science, vol. 7941 , pp. 31–47 (2013)
Aschieri, F., Zorzi, M.: On natural deduction in classical first-order logic: Curry-Howard correspondence, strong normalization and herbrand’s theorem. Theor. Comput. Sci. 625, 125–146 (2016)
Aspinall, D., Hofmann, M.: Dependent types. In: Pierce B., (ed.) Advanced Topics in Types and Programming Languages, chapter 2, pp. 45–86. MIT Press (2005)
Benioff, P.: The computer as a physical system: a microscopic quantum mechanical Hamiltonian model of computers as represented by Turing machines. J. Stat. Phys. 22(5), 563–591 (1980)
Bettelli, S., Calarco, T., Serafini, L.: Toward an architecture for quantum programming. Eur. Phys. J. D At. Mol. Optical Plasma Phys. 25(2), 181–200 (2003)
Dal Lago, U., Masini, A., Zorzi, M.: Quantum implicit computational complexity. Theor. Comput. Sci. 411(2), 377–409 (2010)
Dal Lago, U., Masini, A., Zorzi, M.: Confluence results for a quantum lambda calculus with measurements. Electron. Notes Theor. Comput. Sci. 270(2), 251–261 (2011)
Dal Lago, U., Zorzi, M.: Probabilistic operational semantics for the lambda calculus. RAIRO Theor. Inf. Appl. 46(3), 413–450 (2012)
Dal Lago, U., Zorzi, M.: Wave-style token machines and quantum lambda calculi. In: Proceedings Third International Workshop on Linearity, LINEARITY 2014, Vienna, Austria, 13th July, 2014, Electronic Proceedings in Theoretical Computer Science 176, pp. 64–78
Dal Lago, U., Masini, A., Zorzi, M.: On a measurement-free quantum lambda calculus with classical control. Math. Struct. Comput. Sci. 19(2), 297–335 (2009)
Danos, V., Ehrhard, T.: Probabilistic coherence spaces as a model of higher-order probabilistic computation. Inf. Comput. 209(6), 966–991 (2011)
Danos, V., Kashefi, E., Panangaden, P.: The measurement calculus. J. ACM 54, 2 (2007)
Deutsch, D.: Quantum theory, the Church-Turing principle and the universal quantum computer. Proc. Roy. Soc. Lond. Ser. A 400, 97–117 (1985)
Di Cosmo, R., Dufour, T.: The equational theory of \(\langle {\mathbb{N}},0,1,+,\times,\uparrow \rangle \) is decidable, but not finitely axiomatisable. In: Baader, F., Voronkov, A. (eds.) Logic for Programming, Artificial Intelligence, and Reasoning, pp. 240–256. Springer, Berlin (2005)
Diao, Z., Zubairy, M.S., Chen, G.: A quantum circuit design for grover’s algorithm. Z. Naturforschung A 57(8), 701–708 (2002)
Díaz-Caro, A., Arrighi, P., Gadella, M., Grattage, J.: Measurements and confluence in quantum lambda calculi with explicit qubits. Electron. Notes Theor. Comput. Sci. 270(1), 59–74 (2011)
DiVincenzo, D.P.: The physical implementation of quantum computation. Fortschr. Phys. 48, 771–783 (2000)
Ehrhard, T., Pagani, M., Tasson, C.: Full abstraction for probabilistic pcf. J. ACM 65(4), 23 (2018)
Escardó, M.: Semi-decidability of may, must and probabilistic testing in a higher-type setting. Electronic Notes in Theoretical Computer Science, 249:219 – 242, (2009). In: Proceedings of the 25th Conference on Mathematical Foundations of Programming Semantics, MFPS
Gaboardi, M., Paolini, L., Piccolo, M.: On the reification of semantic linearity. Math. Struct. Comput. Sci. 26(5), 829–867 (2016)
Glos, A., Sadowski, P.: Constructive quantum scaling of unitary matrices. Quant. Inf. Process. 15(12), 5145–5154 (2016)
Goubault-Larrecq, J.: Full abstraction for non-deterministic and probabilistic extensions of pcf i: The angelic cases. J. Logical Algebraic Methods Program., 84(1):155 – 184 (2015). Special Issue: The 23rd Nordic Workshop on Programming Theory (NWPT 2011) Special Issue: Domains X, International workshop on Domain Theory and applications, Swansea, 5–7 September, 2011
Goubault-Larrecq, J., Varacca, D.: Continuous random variables. In: IEEE 26th Annual Symposium on Logic in Computer Science, pp. 97–106, June 2011
Grattage, J.: An overview of QML with a concrete implementation in haskell. Electron. Notes Theor. Comput. Sci. 270(1), 165–174 (2011)
Green, A.S., Lumsdaine, P.L., Ross, N.J., Selinger, P., Valiron, B.: Quipper: A scalable quantum programming language. In: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’13, pp. 333–342, New York, NY, USA, (2013)
Grover, L.K.: Quantum search on structured problems. In Quantum computing and quantum communications (Palm Springs, CA, 1998) Lecture Notes in Comput. Sci., , vol. 1509 , pp. 126–139. Springer, Berlin, (1999)
Hasuo, I., Hoshino, I.: Semantics of higher-order quantum computation via geometry of interaction. In: Proceedings of 26th Annual IEEE Symposium on Logic in Computer Science, pp. 237–246. IEEE Computer Society (2011)
Isham, C.J.: Lectures on quantum theory. Imperial College Press, London, (1995). Mathematical and structural foundations
Jain, R., Ji, Z., Upadhyay, S., Watrous, J.: QIP = PSPACE. J. ACM 58(6), 30 (2011)
Kaye, P., Laflamme, R., Mosca, M.: An Introduction to Quantum Computing. Oxford University Press, Oxford (2007)
Kiefer, S., Murawski, A.S., Ouaknine, J., Wachter, B., Worrell, J.: Algorithmic probabilistic game semantics. Form. Methods Syst. Des. 43(2), 285–312 (2013)
Kitaev, A.Y., Shen, A.H., Vyalyi, M.N.: Classical and quantum computation. AMS, (2002)
Knill, E.: Conventions for quantum pseudocode. Technical report, Los Alamos National Laboratory (1996)
Mahmoud, M., Felty, A.P.: Formalization of Metatheory of the Quipper Programming Language in a Linear Logic. University of Ottawa, Canada (2018)
Masini, A., Viganò, L., Zorzi, M.: Modal deduction systems for quantum state transformations. Mult. Valued Logic Soft Comput. 17(5–6), 475–519 (2011)
Maymin, P.: The lambda-q calculus can efficiently simulate quantum computers. Technical Report arXiv:quant-ph/9702057 (1997)
Metodi, T.S., Faruque, A.I., Chong, F.T.: Quantum Computing for Computer Architects, 2nd edn. Morgan & Claypool Publishers (2011)
Miszczak, J.A.: High-level Structures for Quantum Computing, 1st edn. Morgan and Claypool Publishers, San Rafael (2014)
Nakahara, M., Ohmi, T.: Quantum Computing-From Linear Algebra to Physical Realizations. CRC Press, Boca Raton (2008)
Nielsen, M.: Universal quantum computation using only projective measurement, quantum memory, and preparation of the 0 state. Phys. Lett. 308(2–3), 96–100 (2003)
Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2000)
Nielsen, M.A., Chuang, I.L.: Quantum computation and quantum information, 10th edn. Cambridge University Press, Cambridge (2010)
Nishimura, H., Ozawa, M.: Perfect computational equivalence between quantum turing machines and finitely generated uniform quantum circuit families. Quant. Inf. Process. 8(1), 13–24 (2009)
Pagani, M., Selinger, P., Valiron, B.: Applying quantitative semantics to higher-order quantum computing. In: Proceedings of POPL ’14, pp. 647–658. ACM, (2014)
Paolini, L.: A stable programming language. Inf. Comput. 204(3), 339–375 (2006)
Paolini, L., Piccolo, M., Roversi, L.: A class of reversible primitive recursive functions. Electron. Notes Theor. Comput. Sci. 322(18605), 227–242 (2016)
Paolini, L., Piccolo, M., Roversi, L.: On a class of reversible primitive recursive functions and its turing-complete extensions. New Gener. Comput. 36(3), 233–256 (2018)
Paolini, L., Pimentel, E., Ronchi Della Rocca, S.:An operational characterization of strong normalization. LNCS 3921, 367–381 (2006)
Paolini, L., Roversi, L., Zorzi, M.: Quantum programming made easy. In: V. d. P. Thomas Ehrhard, Maribel Fernández and L. T. de Falco, (ed.). In: Proceedings Joint International Workshop on Linearity & Trends in Linear Logic and Applications (Linearity-TLLA 2018), Oxford, UK, vol. 290 of Electronic Proceedings in Theoretical Computer Science, pp. 58–72, (2019)
Paolini, L., Zorzi, M.: qPCF: a language for quantum circuit computations. In: T. Gopal, G. Jäger, and S. Steila, (ed.). In: Theory and Applications of Models of Computation - 14th Annual Conference, TAMC 2017, Bern, Switzerland, 20-22 April 2017, Proceedings, vol. 10185 of Lecture Notes in Computer Science, pp. 455–469. Springer (2017)
Paykin, J., Rand, R., Zdancewic, S.: Qwire: A core language for quantum circuits. In: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, pp. 846–858, New York, NY, USA, (2017)
Pierce, B.C.: Types and Programming Languages. The MIT Press, Cambridge (2002)
Plotkin, G.D.: LCF considered as a programming language. Theor. Comput. Sci. 5, 223–255 (1977)
Richardson, D., Fitch, J.P.: The identity problem for elementary functions and constants. In: Proceedings of the International Symposium on Symbolic and Algebraic Computation, ISSAC ’94, pp. 285–290 (1994)
Rios, F., Selinger, P.: A categorical model for a quantum circuit description language (extended abstract). In: B. Coecke and A. Kissinger, (ed.) In: Proceedings 14th International Conference on Quantum Physics and Logic, Nijmegen, The Netherlands, 3-7 July 2017, vol. 266 of Electronic Proceedings in Theoretical Computer Science, pp. 164–178. Open Publishing Association (2018)
Ross, N.J.: Algebraic and Logical Methods in Quantum Computation. Ph.D. thesis, Department of Mathematics and Statistics, Dalhousie University, (2015). . arXiv:1510.02198
Selinger, P.: Towards a quantum programming language. Math. Struct. Comput. Sci. 14(4), 527–586 (2004)
Selinger, P., Valiron, B.: A lambda calculus for quantum computation with classical control. Math. Struct. Comput. Sci. 16, 527–552 (2006)
Selinger, P., Valiron, B.: Semantic Techniques in Quantum Computation, Chapter Quantum Lambda Calculus, pp. 135–172. Cambridge University Press, Cambridge (2009)
Shor, P.W.: Algorithms for quantum computation: discrete logarithms and factoring. 35th Annual Symposium on Foundations of Computer Science (Santa Fe. NM, 1994), pp. 124–134. IEEE Comput. Soc. Press, Los Alamitos, CA (1994)
Shor, P.W.: Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Rev. 41(2), 303–332 (1999). (electronic)
Shor, P.W.: Introduction to quantum algorithms. Proceedings of Symposia in Applied Mathematics 58, 143–160 (2002)
Strubell, E.: An introduction to quantum algorithms. University of Massachusetts, Lecture notes (2011)
Valiron, B.: Quantum computation: from a programmer’s perspective. New Gener. Comput. 31(1), 1–26 (2013)
Valiron, B., Ross, N.J., Selinger, P., Alexander, D.S., Smith, J.M.: Programming the quantum future. Commun. ACM 58(8), 52–61 (2015)
Vaux, L.: The algebraic lambda-calculus. Math. Struct. Comput. Sci. 19(5), 1029–1059 (2009)
Viganò, L., Volpe, M., Zorzi, M.: Quantum state transformations and branching distributed temporal logic. In: Proceedings of the 21st International Workshop on Logic, Language, Information, and Computation (WoLLIC), vol. 8652 of Lecture Notes in Computer Science, pp. 1–19. Springer (2014)
Viganò, L., Volpe, M., Zorzi, M.: A branching distributed temporal logic for reasoning about entanglement-free quantum state transformations. Inf. Comput. 255, 311–333 (2017)
Xi, H., Pfenning, F.: Dependent types in practical programming. In: Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’99, pp. 214–227, New York, NY, USA, (1999)
Ying, M.: Foundations of Quantum Programming, 1st edn. Morgan Kaufmann Publishers Inc (2016)
Zenger, C.: Indexed types. Theor. Comput. Sci. 187(1), 147–165 (1997)
Zorzi, M.: On quantum lambda calculi: a foundational perspective. Math. Struct. Comput. Sci. 26(7), 1107–1195 (2016)
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Paolini, L., Piccolo, M. & Zorzi, M. QPCF: Higher-Order Languages and Quantum Circuits. J Autom Reasoning 63, 941–966 (2019). https://doi.org/10.1007/s10817-019-09518-y
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10817-019-09518-y