Welcome to Quantum PL & Verification Bibliography maintained by Kartik Singhal. Browse without and with abstracts, bib entries. Please file issues/send PRs if you find any mistakes or missing entries. An alternate interface is available at quantumpl.github.io.
[1] |
Samson Abramsky and Bob Coecke.
A Categorical Semantics of Quantum Protocols.
In Proceedings of the 19th Annual IEEE Symposium on Logic in
Computer Science, LICS '04, pages 415–425, Los Alamitos, CA, USA, July
2004. IEEE Computer Society.
[ bib |
DOI |
arXiv ]
We study quantum information and computation from a novel point of view. Our approach is based on recasting the standard axiomatic presentation of quantum mechanics, due to von Neumann, at a more abstract level, of compact closed categories with biproducts. We show how the essential structures found in key quantum information protocols such as teleportation, logic-gate teleportation, and entanglement-swapping can be captured at this abstract level. Moreover, from the combination of the – apparently purely qualitative – structures of compact closure and biproducts there emerge 'scalars' and a 'Born rule'. This abstract and structural point of view opens up new possibilities for describing and reasoning about quantum systems. It also shows the degrees of axiomatic freedom: we can show what requirements are placed on the (semi)ring of scalars C(I,I), where C is the category and I is the tensor unit, in order to perform various protocols such as teleportation. Our formalism captures both the information-flow aspect of the protocols (see quant-ph/0402014), and the branching due to quantum indeterminism. This contrasts with the standard accounts, in which the classical information flows are 'outside' the usual quantum-mechanical formalism. Keywords: protocols, teleportation, performance evaluation, quantum computing, quantum entanglement, quantum mechanics, laboratories, communication channels, force measurement, measurement standards |
[2] |
Samson Abramsky and Bob Coecke.
Categorical Quantum Mechanics.
In Kurt Engesser, Dov M. Gabbay, and Daniel Lehmann, editors,
Handbook of Quantum Logic and Quantum Structures, pages 261–323. Elsevier,
Amsterdam, November 2008.
[ bib |
DOI |
arXiv ]
This invited chapter in the Handbook of Quantum Logic and Quantum Structures consists of two parts: 1. A substantially updated version of quant-ph/0402130 by the same authors, which initiated the area of categorical quantum mechanics, but had not yet been published in full length; 2. An overview of the progress which has been made since then in this area. Keywords: protocols, teleportation, performance evaluation, quantum computing, quantum entanglement, quantum mechanics, laboratories, communication channels, force measurement, measurement standards |
[3] |
Thorsten Altenkirch and Jonathan Grattage.
A Functional Quantum Programming Language.
In Proceedings of the 20th Annual IEEE Symposium on Logic in
Computer Science, LICS '05, pages 249–258, Los Alamitos, CA, USA, June
2005. IEEE Computer Society.
[ bib |
DOI |
arXiv ]
We introduce the language QML, a functional language for quantum computations on finite types. Its design is guided by its categorical semantics: QML programs are interpreted by morphisms in the category FQC of finite quantum computations, which provides a constructive semantics of irreversible quantum computations realisable as quantum gates. QML integrates reversible and irreversible quantum computations in one language, using first order strict linear logic to make weakenings explicit. Strict programs are free from decoherence and hence preserve superpositions and entanglement - which is essential for quantum parallelism. Keywords: quantum computing, quantum entanglement, functional programming, quantum gates, formal logic, quantum entanglement, functional languages |
[4] |
Thorsten Altenkirch and Alexander S. Green.
The Quantum IO Monad.
In Gay and Mackie [55], pages 173–205.
[ bib |
DOI |
.pdf ]
The quantum IO monad is a purely functional interface to quantum programming implemented as a Haskell library. At the same time it provides a constructive semantics of quantum programming. The QIO monad separates reversible (i.e., unitary) and irreversible (i.e., probabilistic) computations and provides a reversible let operation (ulet), allowing us to use ancillas (auxiliary qubits) in a modular fashion. QIO programs can be simulated either by calculating a probability distribution or by embedding it into the IO monad using the random number generator. As an example we present a complete implementation of Shor's algorithm. |
[5] |
Matthew Amy.
Formal Methods in Quantum Circuit Design.
PhD thesis, University of Waterloo, Waterloo, Ontario, Canada,
February 2019.
[ bib |
http ]
The design and compilation of correct, efficient quantum circuits is integral to the future operation of quantum computers. This thesis makes contributions to the problems of optimizing and verifying quantum circuits, with an emphasis on the development of formal models for such purposes. We also present software implementations of these methods, which together form a full stack of tools for the design of optimized, formally verified quantum oracles. On the optimization side, we study methods for the optimization of Rz and CNOT gates in Clifford+Rz circuits. We develop a general, efficient optimization algorithm called phase folding, which reduces the number of Rz gates without increasing any metrics by computing its phase polynomial. This algorithm can further be combined with synthesis techniques for CNOT-dihedral operators to optimize circuits with respect to particular costs. We then study the optimal synthesis problem for CNOT-dihedral operators from the perspectives of Rz and CNOT gate optimization. In the case of Rz gate optimization, we show that the optimal synthesis problem is polynomial-time equivalent to minimum-distance decoding in certain Reed-Muller codes. For the CNOT optimization problem, we show that the optimal synthesis problem is at least as hard as a combinatorial problem related to Gray codes. In both cases, we develop heuristics for the optimal synthesis problem, which together with phase folding reduces T counts by 42% and CNOT counts by 22% across a suite of real-world benchmarks. From the perspective of formal verification, we make two contributions. The first is the development of a formal model of quantum circuits with ancillary bits based on the Feynman path integral, along with a concrete verification algorithm. The path integral model, with some syntactic sugar, further doubles as a natural specification language for quantum computations. Our experiments show some practical circuits with up to hundreds of qubits can be efficiently verified. Our second contribution is a formally verified, optimizing compiler for reversible circuits. The compiler compiles a classical, irreversible language to reversible circuits, with a formal, machine-checked proof of correctness written in the proof assistant F*. The compiler is structured as a partial evaluator, allowing verification to be carried out significantly faster than previous results. Keywords: quantum computing, quantum circuits, compiler optimization, formal verification, sum-over-paths |
[6] |
Matthew Amy.
Sized Types for Low-Level Quantum Metaprogramming.
In Michael Kirkedal Thomsen and Mathias Soeken, editors,
Reversible Computation (RC '19), volume 11497 of Lecture Notes in
Computer Science, pages 87–107, Cham, May 2019. Springer International
Publishing.
[ bib |
DOI |
arXiv ]
One of the most fundamental aspects of quantum circuit design is the concept of families of circuits parametrized by an instance size. As in classical programming, metaprogramming allows the programmer to write entire families of circuits simultaneously, an ability which is of particular importance in the context of quantum computing as algorithms frequently use arithmetic over non-standard word lengths. In this work, we introduce metaQASM, a typed extension of the openQASM language supporting the metaprogramming of circuit families. Our language and type system, built around a lightweight implementation of sized types, supports subtyping over register sizes and is moreover type-safe. In particular, we prove that our system is strongly normalizing, and as such any well-typed metaQASM program can be statically unrolled into a finite circuit. Keywords: quantum programming, circuit description languages, metaprogramming, openqasm, qasm |
[7] |
Matthew Amy.
Towards Large-Scale Functional Verification of Universal Quantum
Circuits.
In Peter Selinger and Giulio Chiribella, editors, Proceedings of
the 15th International Conference on Quantum Physics and Logic (QPL),
Halifax, Canada, June 3–7, 2018, volume 287 of Electronic Proceedings
in Theoretical Computer Science, pages 1–21, Waterloo, NSW, Australia,
January 2019. Open Publishing Association.
[ bib |
DOI ]
We introduce a framework for the formal specification and verification of quantum circuits based on the Feynman path integral. Our formalism, built around exponential sums of polynomial functions, provides a structured and natural way of specifying quantum operations, particularly for quantum implementations of classical functions. Verification of circuits over all levels of the Clifford hierarchy with respect to either a specification or reference circuit is enabled by a novel rewrite system for exponential sums with free variables. Our algorithm is further shown to give a polynomial-time decision procedure for checking the equivalence of Clifford group circuits. We evaluate our methods by performing automated verification of optimized Clifford+T circuits with up to 100 qubits and thousands of T gates, as well as the functional verification of quantum algorithms using hundreds of qubits. Our experiments culminate in the automated verification of the Hidden Shift algorithm for a class of Boolean functions in a fraction of the time it has taken recent algorithms to simulate. Keywords: sum-over-paths |
[8] |
Matthew Amy and Vlad Gheorghiu.
staq – A full-stack quantum processing toolkit.
Quantum Science and Technology, 5(3):034016, June 2020.
[ bib |
DOI |
arXiv |
https ]
We describe staq, a full-stack quantum processing toolkit written in standard C++. staq is a quantum compiler toolkit, comprising of tools that range from quantum optimizers and translators to physical mappers for quantum devices with restricted connectives. The design of staq is inspired from the UNIX philosophy of `less is more', i.e. staq achieves complex functionality via combining (piping) small tools, each of which performs a single task using the most advanced current state-of-the-art methods. We also provide a set of illustrative benchmarks. |
[9] |
Ebrahim Ardeshir-Larijani, Simon J. Gay, and Rajagopal Nagarajan.
Automated Equivalence Checking of Concurrent Quantum Systems.
ACM Transactions on Computational Logic, 19(4):28, November
2018.
[ bib |
DOI |
http ]
The novel field of quantum computation and quantum information has gathered significant momentum in the last few years. It has the potential to radically impact the future of information technology and influence the development of modern society. The construction of practical, general purpose quantum computers has been challenging, but quantum cryptographic and communication devices have been available in the commercial marketplace for several years. Quantum networks have been built in various cities around the world and a dedicated satellite has been launched by China to provide secure quantum communication. Such new technologies demand rigorous analysis and verification before they can be trusted in safety- and security-critical applications. Experience with classical hardware and software systems has shown the difficulty of achieving robust and reliable implementations.We present CCSq, a concurrent language for describing quantum systems, and develop verification techniques for checking equivalence between CCSq processes. CCSq has well-defined operational and superoperator semantics for protocols that are functional, in the sense of computing a deterministic input-output relation for all interleavings arising from concurrency in the system. We have implemented QEC (Quantum Equivalence Checker), a tool that takes the specification and implementation of quantum protocols, described in CCSq, and automatically checks their equivalence. QEC is the first fully automatic equivalence checking tool for concurrent quantum systems. For efficiency purposes, we restrict ourselves to Clifford operators in the stabilizer formalism, but we are able to verify protocols over all input states. We have specified and verified a collection of interesting and practical quantum protocols, ranging from quantum communication and quantum cryptography to quantum error correction. Keywords: concurrency, process calculi, equivalence checking, quantum information processing, programming language semantics |
[10] |
Miriam Backens.
The ZX-calculus is complete for stabilizer quantum mechanics.
New Journal of Physics, 16(9):093021, September 2014.
[ bib |
DOI ]
The ZX-calculus is a graphical calculus for reasoning about quantum systems and processes. It is known to be universal for pure state qubit quantum mechanics (QM), meaning any pure state, unitary operation and post-selected pure projective measurement can be expressed in the ZX-calculus. The calculus is also sound, i.e. any equality that can be derived graphically can also be derived using matrix mechanics. Here, we show that the ZX-calculus is complete for pure qubit stabilizer QM, meaning any equality that can be derived using matrices can also be derived pictorially. The proof relies on bringing diagrams into a normal form based on graph states and local Clifford operations. Keywords: zx-calculus |
[11] |
Costin Bădescu and Prakash Panangaden.
Quantum Alternation: Prospects and Problems.
In Chris Heunen, Peter Selinger, and Jamie Vicary, editors,
Proceedings of the 12th International Workshop on Quantum Physics and Logic
(QPL), Oxford, U.K., July 15–17, 2015, volume 195 of Electronic
Proceedings in Theoretical Computer Science, pages 33–42, Waterloo, NSW,
Australia, November 2015. Open Publishing Association.
[ bib |
DOI ]
We propose a notion of quantum control in a quantum programming language which permits the superposition of finitely many quantum operations without performing a measurement. This notion takes the form of a conditional construct similar to the IF statement in classical programming languages. We show that adding such a quantum IF statement to the QPL programming language simplifies the presentation of several quantum algorithms. This motivates the possibility of extending the denotational semantics of QPL to include this form of quantum alternation. We give a denotational semantics for this extension of QPL based on Kraus decompositions rather than on superoperators. Finally, we clarify the relation between quantum alternation and recursion, and discuss the possibility of lifting the semantics defined by Kraus operators to the superoperator semantics defined by Selinger. |
[12] |
John C. Baez and Mike Stay.
Physics, Topology, Logic and Computation: A Rosetta Stone.
In Bob Coecke, editor, New Structures for Physics, pages
95–172. Springer, Berlin, Heidelberg, July 2010.
[ bib |
DOI |
arXiv ]
In physics, Feynman diagrams are used to reason about quantum processes. In the 1980s, it became clear that underlying these diagrams is a powerful analogy between quantum physics and topology. Namely, a linear operator behaves very much like a “cobordism”: a manifold representing spacetime, going between two manifolds representing space. This led to a burst of work on topological quantum field theory and “quantum topology”. But this was just the beginning: similar diagrams can be used to reason about logic, where they represent proofs, and computation, where they represent programs. With the rise of interest in quantum cryptography and quantum computation, it became clear that there is extensive network of analogies between physics, topology, logic and computation. In this expository paper, we make some of these analogies precise using the concept of “closed symmetric monoidal category”. We assume no prior knowledge of category theory, proof theory or computer science. Keywords: monoidal category, intuitionistic logic, lambda calculus |
[13] |
Stefano Bettelli, Tommaso Calarco, and Luciano Serafini.
Toward an Architecture for Quantum Programming.
European Physical Journal D: Atomic, Molecular, Optical and
Plasma Physics, 25(2):181–200, August 2003.
[ bib |
DOI |
arXiv ]
It is becoming increasingly clear that, if a useful device for quantum computation will ever be built, it will be embodied by a classical computing machine with control over a truly quantum subsystem, this apparatus performing a mixture of classical and quantum computation. This paper investigates a possible approach to the problem of programming such machines: a template high level quantum language is presented which complements a generic general purpose classical language with a set of quantum primitives. The underlying scheme involves a run-time environment which calculates the byte-code for the quantum operations and pipes it to a quantum device controller or to a simulator. This language can compactly express existing quantum algorithms and reduce them to sequences of elementary operations; it also easily lends itself to automatic, hardware independent, circuit simplification. A publicly available preliminary implementation of the proposed ideas has been realised using the language. |
[14] |
Benjamin Bichsel, Maximilian Baader, Timon Gehr, and Martin Vechev.
Silq: A High-Level Quantum Language with Safe Uncomputation and
Intuitive Semantics.
In Proceedings of the 41st ACM SIGPLAN Conference on Programming
Language Design and Implementation, PLDI '20, pages 286–300, New York,
NY, USA, June 2020. Association for Computing Machinery.
[ bib |
DOI |
.pdf ]
Existing quantum languages force the programmer to work at a low level of abstraction leading to unintuitive and cluttered code. A fundamental reason is that dropping temporary values from the program state requires explicitly applying quantum operations that safely uncompute these values. We present Silq, the first quantum language that addresses this challenge by supporting safe, automatic uncomputation. This enables an intuitive semantics that implicitly drops temporary values, as in classical computation. To ensure physicality of Silq's semantics, its type system leverages novel annotations to reject unphysical programs. Our experimental evaluation demonstrates that Silq programs are not only easier to read and write, but also significantly shorter than equivalent programs in other quantum languages (on average -46% for Q#, -38% for Quipper), while using only half the number of quantum primitives. Keywords: quantum language, semantics, uncomputation |
[15] |
Jaap Boender, Florian Kammüller, and Rajagopal Nagarajan.
Formalization of Quantum Protocols using Coq.
In Chris Heunen, Peter Selinger, and Jamie Vicary, editors,
Proceedings of the 12th International Workshop on Quantum Physics and Logic
(QPL), Oxford, U.K., July 15–17, 2015, volume 195 of Electronic
Proceedings in Theoretical Computer Science, pages 71–83, Waterloo, NSW,
Australia, November 2015. Open Publishing Association.
[ bib |
DOI ]
Quantum Information Processing, which is an exciting area of research at the intersection of physics and computer science, has great potential for influencing the future development of information processing systems. The building of practical, general purpose Quantum Computers may be some years into the future. However, Quantum Communication and Quantum Cryptography are well developed. Commercial Quantum Key Distribution systems are easily available and several QKD networks have been built in various parts of the world. The security of the protocols used in these implementations rely on information-theoretic proofs, which may or may not reflect actual system behaviour. Moreover, testing of implementations cannot guarantee the absence of bugs and errors. This paper presents a novel framework for modelling and verifying quantum protocols and their implementations using the proof assistant Coq. We provide a Coq library for quantum bits (qubits), quantum gates, and quantum measurement. As a step towards verifying practical quantum communication and security protocols such as Quantum Key Distribution, we support multiple qubits, communication and entanglement. We illustrate these concepts by modelling the Quantum Teleportation Protocol, which communicates the state of an unknown quantum bit using only a classical channel. |
[16] |
Anthony Bordg, Hanna Lachnitt, and Yijun He.
Certified Quantum Computation in Isabelle/HOL.
Journal of Automated Reasoning, 65(5):691–709, December 2020.
[ bib |
DOI |
.html ]
In this article we present an ongoing effort to formalise quantum algorithms and results in quantum information theory using the proof assistant Isabelle/HOL. Formal methods being critical for the safety and security of algorithms and protocols, we foresee their widespread use for quantum computing in the future. We have developed a large library for quantum computing in Isabelle based on a matrix representation for quantum circuits, successfully formalising the no-cloning theorem, quantum teleportation, Deutsch's algorithm, the Deutsch–Jozsa algorithm and the quantum Prisoner's Dilemma. We discuss the design choices made and report on an outcome of our work in the field of quantum game theory. Keywords: isabelle/hol, certification, quantum computing, no-cloning, quantum teleportation, deutsch's algorithm, deutsch–jozsa algorithm, quantum prisoner's dilemma |
[17] |
Anthony Bordg, Hanna Lachnitt, and Yijun He.
Isabelle Marries Dirac: a Library for Quantum Computation and
Quantum Information.
Archive of Formal Proofs, 2020, November 2020.
[ bib |
.html ]
This work is an effort to formalise some quantum algorithms and results in quantum information theory. Formal methods being critical for the safety and security of algorithms and protocols, we foresee their widespread use for quantum computing in the future. We have developed a large library for quantum computing in Isabelle based on a matrix representation for quantum circuits, successfully formalising the no-cloning theorem, quantum teleportation, Deutsch's algorithm, the Deutsch-Jozsa algorithm and the quantum Prisoner's Dilemma. |
[18] |
Hans J. Briegel, Dan E. Browne, Wolfgang Dür, Robert Raußendorf, and
Maarten Van den Nest.
Measurement-Based Quantum Computation.
Nature Physics, 5(1):19–26, January 2009.
[ bib |
DOI |
arXiv ]
Quantum computation offers a promising new kind of information processing, where the non-classical features of quantum mechanics are harnessed and exploited. A number of models of quantum computation exist. These models have been shown to be formally equivalent, but their underlying elementary concepts and the requirements for their practical realization can differ significantly. A particularly exciting paradigm is that of measurement-based quantum computation, where the processing of quantum information takes place by rounds of simple measurements on qubits prepared in a highly entangled state. We review recent developments in measurement-based quantum computation with a view to both fundamental and practical issues, in particular the power of quantum computation, the protection against noise (fault tolerance) and steps towards experimental realization. Finally, we highlight a number of connections between this field and other branches of physics and mathematics. |
[19] |
Kostia Chardonnet, Benoît Valiron, and Renaud Vilmart.
Geometry of Interaction for ZX-Diagrams.
In Filippo Bonchi and Simon J. Puglisi, editors, 46th
International Symposium on Mathematical Foundations of Computer Science (MFCS
2021), volume 202 of Leibniz International Proceedings in Informatics
(LIPIcs), pages 30:1–30:16, Dagstuhl, Germany, August 2021. Schloss
Dagstuhl – Leibniz-Zentrum für Informatik.
[ bib |
DOI |
https ]
ZX-Calculus is a versatile graphical language for quantum computation equipped with an equational theory. Getting inspiration from Geometry of Interaction, in this paper we propose a token-machine-based asynchronous model of both pure ZX-Calculus and its extension to mixed processes. We also show how to connect this new semantics to the usual standard interpretation of ZX-diagrams. This model allows us to have a new look at what ZX-diagrams compute, and give a more local, operational view of the semantics of ZX-diagrams. Keywords: quantum computation, linear logic, zx-calculus, geometry of interaction |
[20] |
Christophe Chareton, Sébastien Bardin, François Bobot, Valentin
Perrelle, and Benoît Valiron.
An Automated Deductive Verification Framework for
Circuit-Building Quantum Programs.
In Nobuko Yoshida, editor, Programming Languages and Systems,
ESOP 2021, volume 12648 of Lecture Notes in Computer Science, pages
148–177, Cham, March 2021. Springer International Publishing.
[ bib |
DOI |
arXiv ]
While recent progress in quantum hardware open the door for significant speedup in certain key areas, quantum algorithms are still hard to implement right, and the validation of such quantum programs is a challenge. In this paper we propose Qbricks, a formal verification environment for circuit-building quantum programs, featuring both parametric specifications and a high degree of proof automation. We propose a logical framework based on first-order logic, and develop the main tool we rely upon for achieving the automation of proofs of quantum specification: PPS, a parametric extension of the recently developed path sum semantics. To back-up our claims, we implement and verify parametric versions of several famous and non-trivial quantum algorithms, including the quantum parts of Shor's integer factoring, quantum phase estimation (QPE) and Grover's search. Keywords: deductive verification, quantum programming, quantum circuits, sum-over-paths |
[21] |
Christophe Chareton, Sébastien Bardin, Dongho Lee, Benoît Valiron,
Renaud Vilmart, and Zhaowei Xu.
Formal Methods for Quantum Programs: A Survey, September 2021.
To appear as Chapter “Formal methods for Quantum Algorithms” in
“Handbook of Formal Analysis and Verification in Cryptography”, CRC.
[ bib |
arXiv ]
While recent progress in quantum hardware open the door for significant speedup in certain key areas (cryptography, biology, chemistry, optimization, machine learning, etc), quantum algorithms are still hard to implement right, and the validation of such quantum programs is a challenge. Moreover, importing the testing and debugging practices at use in classical programming is extremely difficult in the quantum case, due to the destructive aspect of quantum measurement. As an alternative strategy, formal methods are prone to play a decisive role in the emerging field of quantum software. Recent works initiate solutions for problems occurring at every stage of the development process: high-level program design, implementation, compilation, etc. We review the induced challenges for an efficient use of formal methods in quantum computing and the current most promising research directions. |
[22] |
Yu-Fang Chen, Kai-Min Chung, Ondřej Lengál, Jyun-Ao Lin, Wei-Lun Tsai,
and Di-De Yen.
An Automata-Based Framework for Verification and Bug Hunting in
Quantum Circuits.
Proceedings of the ACM on Programming Languages, 7(PLDI):156,
June 2023.
[ bib |
DOI ]
We introduce a new paradigm for analysing and finding bugs in quantum circuits. In our approach, the problem is given by a triple P C Q and the question is whether, given a set P of quantum states on the input of a circuit C, the set of quantum states on the output is equal to (or included in) a set Q. While this is not suitable to specify, e.g., functional correctness of a quantum circuit, it is sufficient to detect many bugs in quantum circuits. We propose a technique based on tree automata to compactly represent sets of quantum states and develop transformers to implement the semantics of quantum gates over this representation. Our technique computes with an algebraic representation of quantum states, avoiding the inaccuracy of working with floating-point numbers. We implemented the proposed approach in a prototype tool and evaluated its performance against various benchmarks from the literature. The evaluation shows that our approach is quite scalable, e.g., we managed to verify a large circuit with 40 qubits and 141,527 gates, or catch bugs injected into a circuit with 320 qubits and 1,758 gates, where all tools we compared with failed. In addition, our work establishes a connection between quantum program verification and automata, opening new possibilities to exploit the richness of automata theory and automata-based verification in the world of quantum computing. Keywords: quantum circuits, tree automata, verification |
[23] |
Frederic T. Chong, Diana Franklin, and Margaret Martonosi.
Programming languages and compiler design for realistic quantum
hardware.
Nature, 549(7671):180–187, September 2017.
Review Article.
[ bib |
DOI ]
Quantum computing sits at an important inflection point. For years, high-level algorithms for quantum computers have shown considerable promise, and recent advances in quantum device fabrication offer hope of utility. A gap still exists, however, between the hardware size and reliability requirements of quantum computing algorithms and the physical machines foreseen within the next ten years. To bridge this gap, quantum computers require appropriate software to translate and optimize applications (toolflows) and abstraction layers. Given the stringent resource constraints in quantum computing, information passed between layers of software and implementations will differ markedly from in classical computing. Quantum toolflows must expose more physical details between layers, so the challenge is to find abstractions that expose key details while hiding enough complexity. |
[24] |
Vikraman Choudhury, Jacek Karwowski, and Amr Sabry.
Symmetries in Reversible Programming: From Symmetric Rig
Groupoids to Reversible Programming Languages.
Proceedings of the ACM on Programming Languages, 6(POPL),
January 2022.
[ bib |
DOI |
https ]
The Pi family of reversible programming languages for boolean circuits is presented as a syntax of combinators witnessing type isomorphisms of algebraic data types. In this paper, we give a denotational semantics for this language, using weak groupoids à la Homotopy Type Theory, and show how to derive an equational theory for it, presented by 2-combinators witnessing equivalences of type isomorphisms. We establish a correspondence between the syntactic groupoid of the language and a formally presented univalent subuniverse of finite types. The correspondence relates 1-combinators to 1-paths, and 2-combinators to 2-paths in the universe, which is shown to be sound and complete for both levels, forming an equivalence of groupoids. We use this to establish a Curry-Howard-Lambek correspondence between Reversible Logic, Reversible Programming Languages, and Symmetric Rig Groupoids, by showing that the syntax of Pi is presented by the free symmetric rig groupoid, given by finite sets and bijections. Using the formalisation of our results, we perform normalisation-by-evaluation, verification and synthesis of reversible logic gates, motivated by examples from quantum computing. We also show how to reason about and transfer theorems between different representations of reversible circuits. Keywords: groups, reversible computing, homotopy type theory, type isomorphisms, groupoids, univalent foundations, reversible programming languages, permutations, rewriting |
[25] |
Vikraman Choudhury, Amr Sabry, and Borislav Agapiev.
Scheme Pearl: Quantum Continuations, September 2022.
2022 Workshop on Scheme and Functional Programming.
[ bib |
.pdf ]
We advance the thesis that the simulation of quantum circuits is fundamentally about the efficient management of a large (potentially exponential) number of delimited continuations. The family of Scheme languages, with its efficient implementations of first-class continuations and with its imperative constructs, provides an elegant host for modeling and simulating quantum circuits. |
[26] |
Cirq Developers.
Cirq, July 2018.
[ bib |
DOI |
https ]
Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators. |
[27] |
Bob Coecke and Ross Duncan.
Interacting Quantum Observables: Categorical Algebra and
Diagrammatics.
New Journal of Physics, 13(4):043016, April 2011.
[ bib |
DOI ]
This paper has two tightly intertwined aims: (i) to introduce an intuitive and universal graphical calculus for multi-qubit systems, the ZX-calculus, which greatly simplifies derivations in the area of quantum computation and information. (ii) To axiomatize complementarity of quantum observables within a general framework for physical theories in terms of dagger symmetric monoidal categories. We also axiomatize phase shifts within this framework. Using the well-studied canonical correspondence between graphical calculi and dagger symmetric monoidal categories, our results provide a purely graphical formalisation of complementarity for quantum observables. Each individual observable, represented by a commutative special dagger Frobenius algebra, gives rise to an Abelian group of phase shifts, which we call the phase group. We also identify a strong form of complementarity, satisfied by the Z- and X-spin observables, which yields a scaled variant of a bialgebra. Keywords: zx-calculus |
[28] |
Bob Coecke and Aleks Kissinger.
Picturing Quantum Processes: A First Course in Quantum Theory
and Diagrammatic Reasoning.
Cambridge University Press, Cambridge, March 2017.
[ bib |
DOI ]
The unique features of the quantum world are explained in this book through the language of diagrams, setting out an innovative visual method for presenting complex theories. Requiring only basic mathematical literacy, this book employs a unique formalism that builds an intuitive understanding of quantum features while eliminating the need for complex calculations. This entirely diagrammatic presentation of quantum theory represents the culmination of ten years of research, uniting classical techniques in linear algebra and Hilbert spaces with cutting-edge developments in quantum computation and foundations. Written in an entertaining and user-friendly style and including more than one hundred exercises, this book is an ideal first course in quantum theory, foundations, and computation for students from undergraduate to PhD level, as well as an opportunity for researchers from a broad range of fields, from physics to biology, linguistics, and cognitive science, to discover a new set of tools for studying processes and interaction. |
[29] |
Andrea Colledan and Ugo Dal Lago.
On Dynamic Lifting and Effect Typing in Circuit Description
Languages (Extended Version), February 2022.
[ bib |
arXiv ]
In the realm of quantum computing, circuit description languages represent a valid alternative to traditional QRAM-style languages. They indeed allow for finer control over the output circuit, without sacrificing flexibility nor modularity. We introduce a generalization of the paradigmatic lambda-calculus Proto-Quipper-M, itself modeling the core features of the quantum circuit description language Quipper. The extension, called Proto-Quipper-K, is meant to capture a very general form of dynamic lifting. This is made possible by the introduction of a rich type and effect system in which not only computations, but also the very types are effectful. The main results we give for the introduced language are the classic type soundness results, namely subject reduction and progress. Keywords: proto-quipper-k, proto-quipper-m, dynamic lifting |
[30] |
Andrew W. Cross, Lev S. Bishop, John A. Smolin, and Jay M. Gambetta.
Open Quantum Assembly Language, July 2017.
[ bib |
arXiv |
https ]
This document describes a quantum assembly language (QASM) called OpenQASM that is used to implement experiments with low depth quantum circuits. OpenQASM represents universal physical circuits over the CNOT plus SU(2) basis with straight-line code that includes measurement, reset, fast feedback, and gate subroutines. The simple text language can be written by hand or by higher level tools and may be executed on the IBM Q Experience. Keywords: qasm, quantum assembly language, openqasm, quantum computing, quantum information |
[31] |
Andrew W. Cross, Ali Javadi-Abhari, Thomas Alexander, Niel de Beaudrap, Lev S.
Bishop, Steven Heidel, Colm A. Ryan, Prasahnt Sivarajah, John Smolin, Jay M.
Gambetta, and Blake R. Johnson.
OpenQASM 3: A Broader and Deeper Quantum Assembly Language.
ACM Transactions on Quantum Computing, 3(3):12, September 2022.
[ bib |
DOI |
arXiv |
https ]
Quantum assembly languages are machine-independent languages that traditionally describe quantum computation in the circuit model. Open quantum assembly language (OpenQASM 2) was proposed as an imperative programming language for quantum circuits based on earlier QASM dialects. In principle, any quantum computation could be described using OpenQASM 2, but there is a need to describe a broader set of circuits beyond the language of qubits and gates. By examining interactive use cases, we recognize two different timescales of quantum-classical interactions: real-time classical computations that must be performed within the coherence times of the qubits, and near-time computations with less stringent timing. Since the near-time domain is adequately described by existing programming frameworks, we choose in OpenQASM 3 to focus on the real-time domain, which must be more tightly coupled to the execution of quantum operations. We add support for arbitrary control flow as well as calling external classical functions. In addition, we recognize the need to describe circuits at multiple levels of specificity, and therefore we extend the language to include timing, pulse control, and gate modifiers. These new language features create a multi-level intermediate representation for circuit development and optimization, as well as control sequence implementation for calibration, characterization, and error mitigation. Keywords: qasm, quantum assembly language, openqasm, quantum computing, quantum information |
[32] |
Ugo Dal Lago, Claudia Faggian, Benoît Valiron, and Akira Yoshimizu.
The Geometry of Parallelism: Classical, Probabilistic, and
Quantum Effects.
In Proceedings of the 44th ACM SIGPLAN Symposium on Principles
of Programming Languages, POPL '17, pages 833–845, New York, NY, USA,
January 2017. Association for Computing Machinery.
[ bib |
DOI |
arXiv ]
We introduce a Geometry of Interaction model for higher-order quantum computation, and prove its adequacy for a fully fledged quantum programming language in which entanglement, duplication, and recursion are all available. This model is an instance of a new framework which captures not only quantum but also classical and probabilistic computation. Its main feature is the ability to model commutative effects in a parallel setting. Our model comes with a multi-token machine, a proof net system, and a -style language. Being based on a multi-token machine equipped with a memory, it has a concrete nature which makes it well suited for building low-level operational descriptions of higher-order languages. Keywords: memory structure, geometry of interaction, quantum computation, lambda calculus, probabilistic computation |
[33] |
Liliane-Joy Dandy, Emmanuel Jeandel, and Vladimir Zamdzhiev.
Qimaera: Type-safe (Variational) Quantum Programming in Idris,
November 2021.
[ bib |
arXiv |
https ]
Variational Quantum Algorithms are hybrid classical-quantum algorithms where classical and quantum computation work in tandem to solve computational problems. These algorithms create interesting challenges for the design of suitable programming languages. In this paper we introduce Qimaera, which is a set of libraries for the Idris 2 programming language that enable the programmer to implement (variational) quantum algorithms where the full power of the elegant Idris language works in synchrony with quantum programming primitives that we introduce. The two key ingredients of Idris that make this possible are (1) dependent types which allow us to implement unitary (i.e. reversible and controllable) quantum operations; and (2) linearity which allows us to enforce fine-grained control over the execution of quantum operations that ensures compliance with the laws of quantum mechanics. We demonstrate that Qimaera is suitable for variational quantum programming by providing implementations of the two most prominent variational quantum algorithms – QAOA and VQE. To the best of our knowledge, this is the first implementation of these algorithms that has been achieved in a type-safe framework. |
[34] |
Vincent Danos, Elham Kashefi, and Prakash Panangaden.
The Measurement Calculus.
Journal of the ACM, 54(2):8, April 2007.
[ bib |
DOI |
.pdf ]
Measurement-based quantum computation has emerged from the physics community as a new approach to quantum computation where the notion of measurement is the main driving force of computation. This is in contrast with the more traditional circuit model that is based on unitary operations. Among measurement-based quantum computation methods, the recently introduced one-way quantum computer [Raussendorf and Briegel 2001] stands out as fundamental. We develop a rigorous mathematical model underlying the one-way quantum computer and present a concrete syntax and operational semantics for programs, which we call patterns, and an algebra of these patterns derived from a denotational semantics. More importantly, we present a calculus for reasoning locally and compositionally about these patterns. We present a rewrite theory and prove a general standardization theorem which allows all patterns to be put in a semantically equivalent standard form. Standardization has far-reaching consequences: a new physical architecture based on performing all the entanglement in the beginning, parallelization by exposing the dependency structure of measurements and expressiveness theorems. Furthermore we formalize several other measurement-based models, for example, Teleportation, Phase and Pauli models and present compositional embeddings of them into and from the one-way model. This allows us to transfer all the theory we develop for the one-way model to these models. This shows that the framework we have developed has a general impact on measurement-based computation and is not just particular to the one-way quantum computer. Keywords: normalization, measurement-based quantum computing, quantum programming languages, models for quantum computing, term rewriting, teleportation-based quantum computing |
[35] |
Vincent Danos, Elham Kashefi, Prakash Panangaden, and Simon Perdrix.
Extended Measurement Calculus.
In Gay and Mackie [55], pages 235–310.
[ bib |
DOI ]
Measurement-based quantum computation (MBQC) has emerged as a new approach to quantum computation where the notion of measurement is the main driving force of computation. This is in contrast with the more traditional circuit model that takes unitary operations as fundamental. Among measurement-based quantum computation methods the recently introduced one-way quantum computer stands out as basic and fundamental. The key idea is to start from an entangled state and then use measurements and one-qubit unitaries, which may be dependent on the outcomes of measurements, to guide the computation. The main point is that one never has to perform unitaries on more than one qubit at a time after the initial preparation of an entangled state. The “programs” that one writes in this model are traditionally called “patterns”. In this chapter, we develop a rigorous mathematical model underlying measurement-based quantum computation. We give syntax, operational semantics, denotational semantics, and an algebra of programs derived from the denotational semantics. We also present a rewrite theory and prove a general standardization theorem that allows all programs to be put in a semantically equivalent standard form. Standardization has far-reaching consequences: a new physical architecture based on performing all the entanglement in the beginning, parallelization by exposing the dependency structure of measurements, and expressiveness theorems.We use our general measurement calculus not just to formalize the one-way model but also several other measurement-based models, e.g., Teleportation, Phase, and Pauli models, and present compositional embeddings of them into and from the one-way model. |
[36] |
Ellie D'Hondt and Prakash Panangaden.
Quantum Weakest Preconditions.
Mathematical Structures in Computer Science, 16(3):429–451,
June 2006.
[ bib |
DOI |
.pdf ]
We develop a notion of predicate transformer and, in particular, the weakest precondition, appropriate for quantum computation. We show that there is a Stone-type duality between the usual state-transformer semantics and the weakest precondition semantics. Rather than trying to reduce quantum computation to probabilistic programming, we develop a notion that is directly taken from concepts used in quantum computation. The proof that weakest preconditions exist for completely positive maps follows immediately from the Kraus representation theorem. As an example, we give the semantics of Selinger's language in terms of our weakest preconditions. We also cover some specific situations and exhibit an interesting link with stabilisers. |
[37] |
Alejandro Díaz-Caro.
A Lambda Calculus for Density Matrices with Classical and
Probabilistic Controls.
In Bor-Yuh Evan Chang, editor, Programming Languages and Systems
(APLAS 2017), volume 10695 of Lecture Notes in Computer Science, pages
448–467, Cham, November 2017. Springer International Publishing.
[ bib |
DOI ]
In this paper we present two flavors of a quantum extension to the lambda calculus. The first one, 𝜆𝜌, follows the approach of classical control/quantum data, where the quantum data is represented by density matrices. We provide an interpretation for programs as density matrices and functions upon them. The second one, 𝜆∘𝜌, take advantage of the density matrices presentation in order to follow the mixed trace of programs in a kind of generalised density matrix. Such a control can be seen as a weaker form of the quantum control and data approach. Keywords: lambda calculus, quantum computing, density matrices, classical control |
[38] |
Alejandro Díaz-Caro.
A Quick Overview on the Quantum Control Approach to the Lambda
Calculus.
In Mauricio Ayala-Rincon and Eduardo Bonelli, editors,
Proceedings of the 16th Workshop on Logical and Semantic Frameworks with
Applications (LSFA), Buenos Aires, Argentina (Online), Juky 23–24, 2021,
volume 357 of Electronic Proceedings in Theoretical Computer Science,
pages 1–17, Waterloo, NSW, Australia, April 2022. Open Publishing
Association.
[ bib |
DOI ]
In this short overview, we start with the basics of quantum computing, explaining the difference between the quantum and the classical control paradigms. We give an overview of the quantum control line of research within the lambda calculus, ranging from untyped calculi up to categorical and realisability models. This is a summary of the last 10+ years of research in this area, starting from Arrighi and Dowek's seminal work until today. |
[39] |
Alejandro Díaz-Caro, Pablo Arrighi, Manuel Gadella, and Jonathan Grattage.
Measurements and Confluence in Quantum Lambda Calculi With
Explicit Qubits.
In Proceedings of the Joint 5th International Workshop on
Quantum Physics and Logic and 4th Workshop on Developments in Computational
Models (QPL/DCM 2008), volume 270/1 of Electronic Notes in Theoretical
Computer Science, pages 59–74. Elsevier, February 2011.
[ bib |
DOI ]
This paper demonstrates how to add a measurement operator to quantum λ-calculi. A proof of the consistency of the semantics is given through a proof of confluence presented in a sufficiently general way to allow this technique to be used for other languages. The method described here may be applied to probabilistic rewrite systems in general, and to add measurement to more complex languages such as QML [Grattage, J. and T. Altenkirch, A functional quantum programming language, in: LICS '05: Proceedings of the 20th Annual IEEE Symposium on Logic in Computer Science (2005), pp. 249–258] or Lineal [Arrighi, P. and G. Dowek, A computational definition of the notion of vectorial space, Electronic Notes in Theoretical Computer Science 117 (2005), pp. 249–261; Arrighi, P. and G. Dowek, Linear-algebraic lambda-calculus: higher-order, encodings and confluence, in: B. Buchberger, editor, Term Rewriting and Applications, 19th International Conference, RTA-08, To appear in LNCS (2008), eprint available at arXiv:quant-ph/0612199], which is the subject of further research. Keywords: measurement, quantum lambda calculus, confluence, probabilistic rewrite system |
[40] |
Alejandro Díaz-Caro and Gilles Dowek.
Typing Quantum Superpositions and Measurement.
In Carlos Martín-Vide, Roman Neruda, and Miguel A.
Vega-Rodríguez, editors, Theory and Practice of Natural Computing
(TPNC 2017), volume 10687 of Lecture Notes in Computer Science, pages
281–293, Cham, November 2017. Springer International Publishing.
[ bib |
DOI ]
We propose a way to unify two approaches of non-cloning in quantum lambda-calculi. The first approach is to forbid duplicating variables, while the second is to consider all lambda-terms as algebraic-linear functions. We illustrate this idea by defining a quantum extension of first-order simply-typed lambda-calculus, where the type is linear on superposition, while allows cloning base vectors. In addition, we provide an interpretation of the calculus where superposed types are interpreted as vector spaces and non-superposed types as their basis. Keywords: quantum computing, lambda calculus, algebraic linearity, linear logic, measurement |
[41] |
Alejandro Díaz-Caro and Gilles Dowek.
A New Connective in Natural Deduction, and Its Application to
Quantum Computing.
In Antonio Cerone and Peter Csaba Ölveczky, editors,
Theoretical Aspects of Computing – ICTAC 2021, volume 12819 of Lecture
Notes in Computer Science, pages 175–193, Cham, August 2021. Springer
International Publishing.
[ bib |
DOI |
arXiv ]
We investigate an unsuspected connection between non-harmonious logical connectives, such as Prior's tonk, and quantum computing. We argue that non-harmonious connectives model the information erasure, the non-reversibility, and the non-determinism that occur, among other places, in quantum measurement. We introduce a propositional logic with a non-harmonious connective sup and show that its proof language forms the core of a quantum programming language. |
[42] |
Alejandro Díaz-Caro, Gilles Dowek, and Juan Pablo Rinaldi.
Two linearities for quantum computing in the lambda calculus.
Biosystems, 186:104012, December 2019.
Selected papers from the International Conference on the Theory and
Practice of Natural Computing (TPNC) 2017.
[ bib |
DOI |
arXiv ]
We propose a way to unify two approaches of non-cloning in quantum lambda-calculi: logical and algebraic linearities. The first approach is to forbid duplicating variables, while the second is to consider all lambda-terms as algebraic-linear functions. We illustrate this idea by defining a quantum extension of first-order simply-typed lambda-calculus, where the type is linear on superposition, while allows cloning base vectors. In addition, we provide an interpretation of the calculus where superposed types are interpreted as vector spaces and non-superposed types as their basis. Keywords: quantum computing, lambda calculus, algebraic linearity, linear logic, measurement |
[43] |
Alejandro Díaz-Caro, Mauricio Guillermo, Alexandre Miquel, and Benoît
Valiron.
Realizability in the Unitary Sphere.
In Proceedings of the 34th Annual ACM/IEEE Symposium on Logic in
Computer Science, LICS '19, page 56, Los Alamitos, CA, USA, June 2019.
IEEE Computer Society.
[ bib |
DOI |
arXiv ]
In this paper we present a semantics for a linear algebraic lambda-calculus based on realizability. This semantics characterizes a notion of unitarity in the system, answering a long standing issue. We derive from the semantics a set of typing rules for a simply-typed linear algebraic lambda-calculus, and show how it extends both to classical and quantum lambda-calculi. Keywords: lambda calculus, linear algebra, realizability, classical lambda-calculi, quantum lambda-calculi, unitary |
[44] |
Alejandro Díaz-Caro and Octavio Malherbe.
Quantum Control in the Unitary Sphere: Lambda-S1 and its
Categorical Model.
Logical Methods in Computer Science, 18(3):32, September 2022.
[ bib |
DOI ]
In a recent paper, a realizability technique has been used to give a semantics of a quantum lambda calculus. Such a technique gives rise to an infinite number of valid typing rules, without giving preference to any subset of those. In this paper, we introduce a valid subset of typing rules, defining an expressive enough quantum calculus. Then, we propose a categorical semantics for it. Such a semantics consists of an adjunction between the category of distributive-action spaces of value distributions (that is, linear combinations of values in the lambda calculus), and the category of sets of value distributions. |
[45] |
Mnacho Echenim.
Quantum projective measurements and the CHSH inequality.
Archive of Formal Proofs, 2021, March 2021.
[ bib |
.html ]
This work contains a formalization of quantum projective measurements, also known as von Neumann measurements, which are based on elements of spectral theory. We also formalized the CHSH inequality, an inequality involving expectations in a probability space that is violated by quantum measurements, thus proving that quantum mechanics cannot be modeled with an underlying local hidden-variable theory. |
[46] |
Mnacho Echenim and Mehdi Mhalla.
Quantum projective measurements and the CHSH inequality in
Isabelle/HOL, March 2021.
[ bib |
arXiv ]
We present a formalization in Isabelle/HOL of quantum projective measurements, a class of measurements involving orthogonal projectors that is frequently used in quantum computing. We also formalize the CHSH inequality, a result that holds on arbitrary probability spaces, which can used to disprove the existence of a local hidden-variable theory for quantum mechanics. |
[47] |
Yuan Feng, Sanjiang Li, and Mingsheng Ying.
Verification of Distributed Quantum Programs.
ACM Transactions on Computational Logic, 23(3):19, July 2022.
[ bib |
DOI |
arXiv ]
Distributed quantum systems and especially the Quantum Internet have the ever-increasing potential to fully demonstrate the power of quantum computation. This is particularly true given that developing a general-purpose quantum computer is much more difficult than connecting many small quantum devices. One major challenge of implementing distributed quantum systems is programming them and verifying their correctness. In this paper, we propose a CSP-like distributed programming language to facilitate the specification and verification of such systems. After presenting its operational and denotational semantics, we develop a Hoare-style logic for distributed quantum programs and establish its soundness and (relative) completeness with respect to both partial and total correctness. The effectiveness of the logic is demonstrated by its applications in the verification of quantum teleportation and local implementation of non-local CNOT gates, two important algorithms widely used in distributed quantum systems. Keywords: distributed computing, quantum programming, formal verification, hoare logic |
[48] |
Yuan Feng and Mingsheng Ying.
Quantum Hoare Logic with Classical Variables.
ACM Transactions on Quantum Computing, 2(4):16, December 2021.
[ bib |
DOI |
arXiv ]
Hoare logic provides a syntax-oriented method to reason about program correctness and has been proven effective in the verification of classical and probabilistic programs. Existing proposals for quantum Hoare logic either lack completeness or support only quantum variables, thus limiting their capability in practical use. In this article, we propose a quantum Hoare logic for a simple while language that involves both classical and quantum variables. Its soundness and relative completeness are proven for both partial and total correctness of quantum programs written in the language. Remarkably, with novel definitions of classical-quantum states and corresponding assertions, the logic system is quite simple and similar to the traditional Hoare logic for classical programs. Furthermore, to simplify reasoning in real applications, auxiliary proof rules are provided that support standard logical operation in the classical part of assertions and super-operator application in the quantum part. Finally, a series of practical quantum algorithms, in particular the whole algorithm of Shor's factorisation, are formally verified to show the effectiveness of the logic. Keywords: quantum while language, quantum programming, hoare logic |
[49] |
Peng Fu, Kohei Kishida, Neil J. Ross, and Peter Selinger.
A Tutorial Introduction to Quantum Circuit Programming in
Dependently Typed Proto-Quipper.
In Ivan Lanese and Mariusz Rawski, editors, Reversible
Computation (RC '20), volume 12227 of Lecture Notes in Computer
Science, pages 153–168, Cham, July 2020. Springer International
Publishing.
[ bib |
DOI |
arXiv ]
We introduce dependently typed Proto-Quipper, or Proto-Quipper-D for short, an experimental quantum circuit programming language with linear dependent types. We give several examples to illustrate how linear dependent types can help in the construction of correct quantum circuits. Specifically, we show how dependent types enable programming families of circuits, and how dependent types solve the problem of type-safe uncomputation of garbage qubits. We also discuss other language features along the way. Keywords: quantum programming languages, linear dependent types, proto-quipper-d |
[50] |
Peng Fu, Kohei Kishida, Neil J. Ross, and Peter Selinger.
A biset-enriched categorical model for Proto-Quipper with
dynamic lifting.
In Proceedings of the 19th International Conference on Quantum
Physics and Logic (QPL), Oxford, U.K., June 27–July 1, 2022. Open
Publishing Association, April 2022.
To appear.
[ bib |
arXiv ]
Quipper and Proto-Quipper are a family of quantum programming languages that, by their nature as circuit description languages, involve two runtimes: one at which the program generates a circuit and one at which the circuit is executed, normally with probabilistic results due to measurements. Accordingly, the language distinguishes two kinds of data: parameters, which are known at circuit generation time, and states, which are known at circuit execution time. Sometimes, it is desirable for the results of measurements to control the generation of the next part of the circuit. Therefore, the language needs to turn states, such as measurement outcomes, into parameters, an operation we call dynamic lifting. The goal of this paper is to model this interaction between the runtimes by providing a general categorical structure enriched in what we call "bisets". We demonstrate that the biset-enriched structure achieves a proper semantics of the two runtimes and their interaction, by showing that it models a variant of Proto-Quipper with dynamic lifting. The present paper deals with the concrete categorical semantics of this language, whereas a companion paper [FKRS2022a] deals with the syntax, type system, operational semantics, and abstract categorical semantics. Keywords: proto-quipper-dyn, proto-quipper, quipper, categorical semantics |
[51] |
Peng Fu, Kohei Kishida, Neil J. Ross, and Peter Selinger.
Proto-Quipper with Dynamic Lifting.
Proceedings of the ACM on Programming Languages, 7(POPL):11,
January 2023.
[ bib |
DOI |
arXiv |
https ]
Quipper is a functional programming language for quantum computing. Proto-Quipper is a family of languages aiming to provide a formal foundation for Quipper. In this paper, we extend Proto-Quipper-M with a construct called dynamic lifting, which is present in Quipper. By virtue of being a circuit description language, Proto-Quipper has two separate runtimes: circuit generation time and circuit execution time. Values that are known at circuit generation time are called parameters, and values that are known at circuit execution time are called states. Dynamic lifting is an operation that enables a state, such as the result of a measurement, to be lifted to a parameter, where it can influence the generation of the next portion of the circuit. As a result, dynamic lifting enables Proto-Quipper programs to interleave classical and quantum computation. We describe the syntax of a language we call Proto-Quipper-Dyn. Its type system uses a system of modalities to keep track of the use of dynamic lifting. We also provide an operational semantics, as well as an abstract categorical semantics for dynamic lifting based on enriched category theory. We prove that both the type system and the operational semantics are sound with respect to our categorical semantics. Finally, we give some examples of Proto-Quipper-Dyn programs that make essential use of dynamic lifting. Keywords: proto-quipper-dyn, proto-quipper-m, proto-quipper, quipper, quantum programming languages, categorical semantics, dynamic lifting |
[52] |
Peng Fu, Kohei Kishida, and Peter Selinger.
Linear Dependent Type Theory for Quantum Programming
Languages: Extended Abstract.
In Proceedings of the 35th Annual ACM/IEEE Symposium on Logic in
Computer Science, LICS '20, pages 440–453, New York, NY, USA, July
2020. Association for Computing Machinery.
[ bib |
DOI ]
Modern quantum programming languages integrate quantum resources and classical control. They must, on the one hand, be linearly typed to reflect the no-cloning property of quantum resources. On the other hand, high-level and practical languages should also support quantum circuits as first-class citizens, as well as families of circuits that are indexed by some classical parameters. Quantum programming languages thus need linear dependent type theory. This paper defines a general semantic structure for such a type theory via certain fibrations of monoidal categories. The categorical model of the quantum circuit description language Proto-Quipper-M by Rios & Selinger constitutes an example of such a fibration, which means that the language can readily be integrated with dependent types. We then devise both a general linear dependent type system and a dependently typed extension of Proto-Quipper-M, and provide them with operational semantics as well as a prototype implementation. Keywords: proto-quipper-d, fibration, categorical model, quantum programming languages, linear dependent types, proto-quipper-m |
[53] |
Peng Fu, Kohei Kishida, and Peter Selinger.
Linear Dependent Type Theory for Quantum Programming
Languages.
Logical Methods in Computer Science, 18(3):28, September 2022.
[ bib |
DOI ]
Modern quantum programming languages integrate quantum resources and classical control. They must, on the one hand, be linearly typed to reflect the no-cloning property of quantum resources. On the other hand, high-level and practical languages should also support quantum circuits as first-class citizens, as well as families of circuits that are indexed by some classical parameters. Quantum programming languages thus need linear dependent type theory. This paper defines a general semantic structure for such a type theory via certain fibrations of monoidal categories. The categorical model of the quantum circuit description language Proto-Quipper-M by Rios and Selinger (2017) constitutes an example of such a fibration, which means that the language can readily be integrated with dependent types. We then devise both a general linear dependent type system and a dependently typed extension of Proto-Quipper-M, and provide them with operational semantics as well as a prototype implementation. Keywords: proto-quipper-d, fibration, categorical model, quantum programming languages, linear dependent types, proto-quipper-m |
[54] |
Simon J. Gay.
Quantum Programming Languages: Survey and Bibliography.
Mathematical Structures in Computer Science, 16(4):581–600,
August 2006.
[ bib |
DOI |
http ]
The field of quantum programming languages is developing rapidly and there is a surprisingly large literature. Research in this area includes the design of programming languages for quantum computing, the application of established semantic and logical techniques to the foundations of quantum mechanics, and the design of compilers for quantum programming languages. This article justifies the study of quantum programming languages, presents the basics of quantum computing, surveys the literature in quantum programming languages, and indicates directions for future research. |
[55] |
Simon J. Gay and Ian Mackie, editors.
Semantic Techniques in Quantum Computation.
Cambridge University Press, Cambridge, November 2009.
[ bib |
DOI ]
The study of computational processes based on the laws of quantum mechanics has led to the discovery of new algorithms, cryptographic techniques, and communication primitives. This book explores quantum computation from the perspective of the branch of theoretical computer science known as semantics, as an alternative to the more well-known studies of algorithmics, complexity theory, and information theory. It collects chapters from leading researchers in the field, discussing the theory of quantum programming languages, logics and tools for reasoning about quantum systems, and novel approaches to the foundations of quantum mechanics. This book is suitable for graduate students and researchers in quantum information and computation, as well as those in semantics, who want to learn about a new field arising from the application of semantic techniques to quantum information and computation. |
[56] |
Simon J. Gay and Rajagopal Nagarajan.
Communicating Quantum Processes.
In Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on
Principles of Programming Languages, POPL '05, pages 145–157, New
York, NY, USA, January 2005. Association for Computing Machinery.
[ bib |
DOI |
arXiv |
.pdf ]
We define a language CQP (Communicating Quantum Processes) for modelling systems which combine quantum and classical communication and computation. CQP combines the communication primitives of the pi-calculus with primitives for measurement and transformation of quantum state; in particular, quantum bits (qubits) can be transmitted from process to process along communication channels. CQP has a static type system which classifies channels, distinguishes between quantum and classical data, and controls the use of quantum state. We formally define the syntax, operational semantics and type system of CQP, prove that the semantics preserves typing, and prove that typing guarantees that each qubit is owned by a unique process within a system. We illustrate CQP by defining models of several quantum communication systems, and outline our plans for using CQP as the foundation for formal analysis and verification of combined quantum and classical systems. Keywords: quantum computing, semantics, verification, types, quantum communication, formal language |
[57] |
Simon J. Gay, Rajagopal Nagarajan, and Nikolaos Papanikolaou.
QMC: A Model Checker for Quantum Systems.
In Aarti Gupta and Sharad Malik, editors, Computer Aided
Verification (CAV '08), volume 5123 of Lecture Notes in Computer
Science, pages 543–547, Berlin, Heidelberg, July 2008. Springer.
[ bib |
DOI |
arXiv ]
The novel field of quantum computation and quantum information has been growing at a rapid rate; the study of quantum information in particular has led to the emergence of communication and cryptographic protocols with no classical analogues. Quantum information protocols have interesting properties which are not exhibited by their classical counterparts, but they are most distinguished for their applications in cryptography. Notable results include the unconditional security proof [1] of quantum key distribution. This result, in particular, is one of the reasons for the widespread interest in this field. Furthermore, the implementation of quantum cryptography has been demonstrated in non-laboratory settings and is already an important practical technology. Implementations of quantum cryptography have already been commercially launched and tested by a number of companies including MagiQ, Id Quantique, Toshiba, and NEC. The unconditional security of quantum key distribution protocols does not automatically imply the same degree of security for actual systems, of course; this justifies the need for systems modelling and verification in this setting. |
[58] |
Vlad Gheorghiu.
Quantum++: A modern C++ quantum computing library.
PLoS ONE, 13(12):e0208073, December 2018.
[ bib |
DOI |
https ]
Quantum++ is a modern general-purpose multi-threaded quantum computing library written in C++11 and composed solely of header files. The library is not restricted to qubit systems or specific quantum information processing tasks, being capable of simulating arbitrary quantum processes. The main design factors taken in consideration were the ease of use, portability, and performance. The library's simulation capabilities are only restricted by the amount of available physical memory. On a typical machine (Intel i5 8Gb RAM) Quantum++ can successfully simulate the evolution of 25 qubits in a pure state or of 12 qubits in a mixed state reasonably fast. The library also includes support for classical reversible logic, being able to simulate classical reversible operations on billions of bits. This latter feature may be useful in testing quantum circuits composed solely of Toffoli gates, such as certain arithmetic circuits. Keywords: quantum computing, libraries, logic circuits, open source software |
[59] |
Jonathan Grattage.
An Overview of QML With a Concrete Implementation in Haskell.
In Proceedings of the Joint 5th International Workshop on
Quantum Physics and Logic and 4th Workshop on Developments in Computational
Models (QPL/DCM 2008), volume 270/1 of Electronic Notes in Theoretical
Computer Science, pages 165–174. Elsevier, February 2011.
[ bib |
DOI |
arXiv ]
This paper gives an introduction to and overview of the functional quantum programming language QML. The syntax of this language is defined and explained, along with a new QML definition of the quantum teleport algorithm. The categorical operational semantics of QML is also briefly introduced, in the form of annotated quantum circuits. This definition leads to a denotational semantics, given in terms of superoperators. Finally, an implementation in Haskell of the semantics for QML is presented as a compiler. The compiler takes QML programs as input, which are parsed into a Haskell datatype. The output from the compiler is either a quantum circuit (operational), an isometry (pure denotational) or a superoperator (impure denotational). Orthogonality judgements and problems with coproducts in QML are also discussed. |
[60] |
Alexander S. Green.
Towards a Formally Verified Functional Quantum Programming
Language.
PhD thesis, University of Nottingham, July 2010.
[ bib |
http ]
This thesis looks at the development of a framework for a functional quantum programming language. The framework is first developed in Haskell, looking at how a monadic structure can be used to explicitly deal with the side-effects inherent in the measurement of quantum systems, and goes on to look at how a dependently-typed reimplementation in Agda gives us the basis for a formally verified quantum programming language. The two implementations are not in themselves fully developed quantum programming languages, as they are embedded in their respective parent languages, but are a major step towards the development of a full formally verified, functional quantum programming language. Dubbed the “Quantum IO Monad”, this framework is designed following a structural approach as given by a categorical model of quantum computation. Keywords: quantum programming, haskell, monadic structure, quantum io monad |
[61] |
Alexander S. Green, Peter LeFanu Lumsdaine, Neil J. Ross, Peter Selinger, and
Benoît Valiron.
An Introduction to Quantum Programming in Quipper.
In Gerhard W. Dueck and D. Michael Miller, editors, Reversible
Computation (RC '13), volume 7948 of Lecture Notes in Computer
Science, pages 110–124, Berlin, Heidelberg, July 2013. Springer.
[ bib |
DOI |
arXiv ]
Quipper is a recently developed programming language for expressing quantum computations. This paper gives a brief tutorial introduction to the language, through a demonstration of how to make use of some of its key features. We illustrate many of Quipper's language features by developing a few well known examples of Quantum computation, including quantum teleportation, the quantum Fourier transform, and a quantum circuit for addition. Keywords: quantum computation, programming languages, quipper |
[62] |
Alexander S. Green, Peter LeFanu Lumsdaine, Neil J. Ross, Peter Selinger, and
Benoît Valiron.
Quipper: A Scalable Quantum Programming Language.
In Proceedings of the 34th ACM SIGPLAN Conference on Programming
Language Design and Implementation, PLDI '13, pages 333–342, New York,
NY, USA, June 2013. Association for Computing Machinery.
[ bib |
DOI |
arXiv ]
The field of quantum algorithms is vibrant. Still, there is currently a lack of programming languages for describing quantum computation on a practical scale, i.e., not just at the level of toy problems. We address this issue by introducing Quipper, a scalable, expressive, functional, higher-order quantum programming language. Quipper has been used to program a diverse set of non-trivial quantum algorithms, and can generate quantum gate representations using trillions of gates. It is geared towards a model of computation that uses a classical computer to control a quantum device, but is not dependent on any particular model of quantum hardware. Quipper has proven effective and easy to use, and opens the door towards using formal methods to analyze quantum algorithms. Keywords: quipper, quantum programming languages |
[63] |
Thomas Häner, Vadym Kliuchnikov, Martin Roetteler, Mathias Soeken, and
Alexander Vaschillo.
QParallel: Explicit Parallelism for Programming Quantum
Computers, October 2022.
[ bib |
arXiv ]
We present a language extension for parallel quantum programming to (1) remove ambiguities concerning parallelism in current quantum programming languages and (2) facilitate space-time tradeoff investigations in quantum computing. While the focus of similar libraries in the domain of classical computing (OpenMP, OpenACC, etc.) is to divide a computation into multiple threads, the main goal of QParallel is to keep the compiler and the runtime system from introducing parallelism-inhibiting dependencies, e.g., through reuse of qubits in automatic qubit management. We describe the syntax and semantics of the proposed language extension, implement a prototype based on Q#, and present several examples and use cases to illustrate its performance benefits. Moreover, we introduce a tool that guides programmers in the placement of parallel regions by identifying the subroutines that profit most from parallelization, which is especially useful if the programmer's knowledge of the source code is limited. Support for QParallel can be added to any multithreading library and language extension, including OpenMP and OpenACC. Keywords: quantum computing, parallel quantum computing, space-time tradeoffs |
[64] |
Ichiro Hasuo and Naohiko Hoshino.
Semantics of higher-order quantum computation via geometry of
interaction.
Annals of Pure and Applied Logic, 168(2):404–469, February
2017.
Eighth Games for Logic and Programming Languages Workshop (GaLoP).
[ bib |
DOI |
arXiv ]
While much of the current study on quantum computation employs low-level formalisms such as quantum circuits, several high-level languages/calculi have been recently proposed aiming at structured quantum programming. The current work contributes to the semantical study of such languages by providing interaction-based semantics of a functional quantum programming language; the latter is, much like Selinger and Valiron's, based on linear lambda calculus and equipped with features like the ! modality and recursion. The proposed denotational model is the first one that supports the full features of a quantum functional programming language; we prove adequacy of our semantics. The construction of our model is by a series of existing techniques taken from the semantics of classical computation as well as from process theory. The most notable among them is Girard's Geometry of Interaction (GoI), categorically formulated by Abramsky, Haghverdi and Scott. The mathematical genericity of these techniques—largely due to their categorical formulation—is exploited for our move from classical to quantum. Keywords: higher-order computation, quantum computation, programming languages, geometry of interaction, denotational semantics, categorical semantics |
[65] |
Bettina Heim.
Development of Quantum Applications.
PhD thesis, ETH Zurich, Zurich, December 2020.
[ bib |
DOI ]
The aim of this thesis is to identify practical applications where quantum computing could have an advantage over what is achievable with conventional means of computing, and what advances are needed in order to actualize that potential. We investigate the possibilities on both quantum annealing devices (analogue quantum computers) as well as on gate-based devices (digital quantum computers). Quantum annealing devices in particular have grown in size and capabilities over the last decade. While they are natural candidates for providing improved solvers for NP-complete optimization problems, the number of qubits, accuracies and available couplings are still limited and their aptitude has yet to be confirmed. We use Monte Carlo methods and conceive an adaptive annealing schedule to assess the options to leverage them for the construction of satisfiability filters. We furthermore investigate their prospective as heuristic solvers for the traveling salesman problem, and what future enhancements in terms of geometries and couplings would be beneficial for that. Based on our simulations there is no reason to expect any benefits to leveraging analogue quantum computers over state-of-the-art classical methods. However, we see an implementation of annealing schemes on future digital devices as a promising approach that doesn't suffer from the same issues that impede performance on analogue devises. To that effect, we construct and implement an efficient quantization of the Metropolis-Hastings algorithm. Opposed to following the common way of quantization à la Szegedy that is usually defined with respect to an oracle, we reformulate the walk to closely mimic the classical algorithm and thus circumvent having to rely on costly quantum arithmetics. Our proposed realization thereby can lead to substantial savings. While theoretical arguments promise a quadratic speedup in the asymptotic limit, we numerically confirm that a polynomial speedup in terms of minimal total time to solution can be achieved for pragmatic use. We explore the prospects of using quantum walks in a heuristic setting and estimate the gate times the would be required to outperform a classical supercomputer. Finally, we elaborate on the role of programming languages, and how software tools can accelerate the advancement of the field. We discuss unique aspects of quantum programming and the purpose of Q# in particular, and conclude by highlighting what developments are needed for quantum computing to live up to its potential. Keywords: programming languages, quantum programming, quantum computing, q# |
[66] |
Bettina Heim, Mathias Soeken, Sarah Marshall, Christopher E. Granade, Martin
Roetteler, Alan Geller, Matthias Troyer, and Krysta M. Svore.
Quantum Programming Languages.
Nature Reviews Physics, 2(12):709–722, December 2020.
[ bib |
DOI |
https ]
Quantum programming languages are essential to translate ideas into instructions that can be executed by a quantum computer. Not only are they crucial to the programming of quantum computers at scale but also they can facilitate the discovery and development of quantum algorithms even before hardware exists that is capable of executing them. Quantum programming languages are used for controlling existing physical devices, for estimating the execution costs of quantum algorithms on future devices, for teaching quantum computing concepts, or for verifying quantum algorithms and their implementations. They are used by newcomers and seasoned practitioners, researchers and developers working on the next ground-breaking discovery or applying known concepts to real-world problems. This variety in purpose and target audiences is reflected in the design and ecosystem of the existing quantum programming languages, depending on which factors a language prioritizes. In this Review, we highlight important aspects of quantum programming and how it differs from conventional programming. We overview a selection of several state-of-the-art quantum programming languages, highlight their salient features, and provide code samples for each of the languages and Docker files to facilitate installation of the software packages. |
[67] |
Chris Heunen and Robin Kaarsgaard.
Quantum Information Effects.
Proceedings of the ACM on Programming Languages, 6(POPL):2,
January 2022.
[ bib |
DOI |
https ]
We study the two dual quantum information effects to manipulate the amount of information in quantum computation: hiding and allocation. The resulting type-and-effect system is fully expressive for irreversible quantum computing, including measurement. We provide universal categorical constructions that semantically interpret this arrow metalanguage with choice, starting with any rig groupoid interpreting the reversible base language. Several properties of quantum measurement follow in general, and we translate quantum flow charts into our language. The semantic constructions turn the category of unitaries between Hilbert spaces into the category of completely positive trace-preserving maps, and they turn the category of bijections between finite sets into the category of functions with chosen garbage. Thus they capture the fundamental theorems of classical and quantum reversible computing of Toffoli and Stinespring. Keywords: effects, quantum computation, reversible computation, information effects, measurement, categorical semantics, arrows |
[68] |
Chris Heunen and Jamie Vicary.
Categories for Quantum Theory: An Introduction.
Oxford University Press, Oxford, November 2019.
[ bib |
DOI ]
Monoidal category theory serves as a powerful framework for describing logical aspects of quantum theory, giving an abstract language for parallel and sequential composition, and a conceptual way to understand many high-level quantum phenomena. This text lays the foundation for this categorical quantum mechanics, with an emphasis on the graphical calculus which makes computation intuitive. Biproducts and dual objects are introduced and used to model superposition and entanglement, with quantum teleportation studied abstractly using these structures. Monoids, Frobenius structures and Hopf algebras are described, and it is shown how they can be used to model classical information and complementary observables. The CP construction, a categorical tool to describe probabilistic quantum systems, is also investigated. The last chapter introduces higher categories, surface diagrams and 2-Hilbert spaces, and shows how the language of duality in monoidal 2-categories can be used to reason about quantum protocols, including quantum teleportation and dense coding. Keywords: category, category theory, quantum theory, graphical calculus, quantum teleportation, compositionality, higher categories, tensor product, hopf algebras, frobenius algebras |
[69] |
Kesha Hietala.
A Verified Software Toolchain For Quantum Programming.
PhD thesis, University of Maryland, College Park, MD, USA, July 2022.
[ bib |
DOI ]
Quantum computing is steadily moving from theory into practice, with small-scale quantum computers available for public use. Now quantum programmers are faced with a classical problem: How can they be sure that their code does what they intend it to do? I aim to show that techniques for classical program verification can be adapted to the quantum setting, allowing for the development of high-assurance quantum software, without sacrificing performance or programmability. In support of this thesis, I present several results in the application of formal methods to the domain of quantum programming, aiming to provide a high-assurance software toolchain for quantum programming. I begin by presenting SQIR, a small quantum intermediate representation deeply embedded in the Coq proof assistant, which has been used to implement and prove correct quantum algorithms such as Grover's search and Shor's factorization algorithm. Next, I present VOQC, a verified optimizer for quantum circuits that contains state-of-the-art SQIR program optimizations with performance on par with unverified tools. I additionally discuss VQO, a framework for specifying and verifying oracle programs, which can then be optimized with VOQC. Finally, I present developing work on providing assurance for a high-level industry quantum programming language, Q#, in the F* proof assistant. Keywords: compilers, formal verification, programming languages, quantum computing |
[70] |
Kesha Hietala, Robert Rand, Shih-Han Hung, Liyi Li, and Michael Hicks.
Proving Quantum Programs Correct.
In Liron Cohen and Cezary Kaliszyk, editors, 12th International
Conference on Interactive Theorem Proving (ITP 2021), volume 193 of
Leibniz International Proceedings in Informatics (LIPIcs), pages
21:1–21:19, Dagstuhl, Germany, June 2021. Schloss Dagstuhl –
Leibniz-Zentrum für Informatik.
[ bib |
DOI |
https ]
As quantum computing progresses steadily from theory into practice, programmers will face a common problem: How can they be sure that their code does what they intend it to do? This paper presents encouraging results in the application of mechanized proof to the domain of quantum programming in the context of the SQIR development. It verifies the correctness of a range of a quantum algorithms including Grover's algorithm and quantum phase estimation, a key component of Shor's algorithm. In doing so, it aims to highlight both the successes and challenges of formal verification in the quantum context and motivate the theorem proving community to target quantum computing as an application domain. Keywords: formal verification, quantum computing, proof engineering |
[71] |
Kesha Hietala, Robert Rand, Shih-Han Hung, Xiaodi Wu, and Michael Hicks.
A Verified Optimizer for Quantum Circuits.
Proceedings of the ACM on Programming Languages, 5(POPL):37,
January 2021.
[ bib |
DOI |
arXiv |
https ]
We present VOQC, the first fully verified optimizer for quantum circuits, written using the Coq proof assistant. Quantum circuits are expressed as programs in a simple, low-level language called SQIR, a simple quantum intermediate representation, which is deeply embedded in Coq. Optimizations and other transformations are expressed as Coq functions, which are proved correct with respect to a semantics of SQIR programs. SQIR uses a semantics of matrices of complex numbers, which is the standard for quantum computation, but treats matrices symbolically in order to reason about programs that use an arbitrary number of quantum bits. SQIR's careful design and our provided automation make it possible to write and verify a broad range of optimizations in VOQC, including full-circuit transformations from cutting-edge optimizers. Keywords: programming languages, formal verification, certified compilation, quantum computing, circuit optimization |
[72] |
Kentaro Honda.
Analysis of Quantum Entanglement in Quantum Programs using
Stabilizer Formalism.
In Chris Heunen, Peter Selinger, and Jamie Vicary, editors,
Proceedings of the 12th International Workshop on Quantum Physics and Logic
(QPL), Oxford, U.K., July 15–17, 2015, volume 195 of Electronic
Proceedings in Theoretical Computer Science, pages 262–272, Waterloo, NSW,
Australia, November 2015. Open Publishing Association.
[ bib |
DOI ]
Quantum entanglement plays an important role in quantum computation and communication. It is necessary for many protocols and computations, but causes unexpected disturbance of computational states. Hence, static analysis of quantum entanglement in quantum programs is necessary. Several papers studied the problem. They decided qubits were entangled if multiple qubits unitary gates are applied to them, and some refined this reasoning using information about the state of each separated qubit. However, they do not care about the fact that unitary gate undoes entanglement and that measurement may separate multiple qubits. In this paper, we extend prior work using stabilizer formalism. It refines reasoning about separability of quantum variables in quantum programs. |
[73] |
Yipeng Huang and Margaret Martonosi.
QDB: From Quantum Algorithms Towards Correct Quantum
Programs.
In Titus Barik, Joshua Sunshine, and Sarah Chasins, editors, 9th
Workshop on Evaluation and Usability of Programming Languages and Tools
(PLATEAU 2018), volume 67 of OpenAccess Series in Informatics
(OASIcs), pages 4:1–4:14, Dagstuhl, Germany, January 2019. Schloss
Dagstuhl – Leibniz-Zentrum für Informatik.
[ bib |
DOI ]
With the advent of small-scale prototype quantum computers, researchers can now code and run quantum algorithms that were previously proposed but not fully implemented. In support of this growing interest in quantum computing experimentation, programmers need new tools and techniques to write and debug QC code. In this work, we implement a range of QC algorithms and programs in order to discover what types of bugs occur and what defenses against those bugs are possible in QC programs. We conduct our study by running small-sized QC programs in QC simulators in order to replicate published results in QC implementations. Where possible, we cross-validate results from programs written in different QC languages for the same problems and inputs. Drawing on this experience, we provide a taxonomy for QC bugs, and we propose QC language features that would aid in writing correct code. Keywords: correctness, debugging |
[74] |
Mathieu Huot and Sam Staton.
Quantum channels as a categorical completion.
In Proceedings of the 34th Annual ACM/IEEE Symposium on Logic in
Computer Science, LICS '19, page 35, Los Alamitos, CA, USA, June 2019.
IEEE Computer Society.
[ bib |
DOI |
arXiv ]
We propose a categorical foundation for the connection between pure and mixed states in quantum information and quantum computation. The foundation is based on distributive monoidal categories. First, we prove that the category of all quantum channels is a canonical completion of the category of pure quantum operations (with ancilla preparations). More precisely, we prove that the category of completely positive trace-preserving maps between finite-dimensional C*-algebras is a canonical completion of the category of finite-dimensional vector spaces and isometries. Second, we extend our result to give a foundation to the topological relationships between quantum channels. We do this by generalizing our categorical foundation to the topologically-enriched setting. In particular, we show that the operator norm topology on quantum channels is the canonical topology induced by the norm topology on isometries. Keywords: category theory, mathematical operators, quantum computing, quantum theory, topology, vectors |
[75] |
Mathieu Huot and Sam Staton.
Universal Properties in Quantum Theory.
In Peter Selinger and Giulio Chiribella, editors, Proceedings of
the 15th International Conference on Quantum Physics and Logic (QPL),
Halifax, Canada, June 3–7, 2018, volume 287 of Electronic Proceedings
in Theoretical Computer Science, pages 213–223, Waterloo, NSW, Australia,
January 2019. Open Publishing Association.
[ bib |
DOI ]
We argue that notions in quantum theory should have universal properties in the sense of category theory. We consider the completely positive trace preserving (CPTP) maps, the basic notion of quantum channel. Physically, quantum channels are derived from pure quantum theory by allowing discarding. We phrase this in category theoretic terms by showing that the category of CPTP maps is the universal monoidal category with a terminal unit that has a functor from the category of isometries. In other words, the CPTP maps are the affine reflection of the isometries. Keywords: category theory, quantum theory, monoidal category |
[76] |
David Ittah, Thomas Häner, Vadym Kliuchnikov, and Torsten Hoefler.
QIRO: A Static Single Assignment-Based Quantum Program
Representation for Optimization.
ACM Transactions on Quantum Computing, 3(3):14, July 2022.
[ bib |
DOI |
arXiv ]
We propose an IR for quantum computing that directly exposes quantum and classical data dependencies for the purpose of optimization. The Quantum Intermediate Representation for Optimization (QIRO) consists of two dialects, one input dialect and one that is specifically tailored to enable quantum-classical co-optimization. While the first employs a perhaps more intuitive memory-semantics (quantum operations act on qubits via side-effects), the latter uses value-semantics (operations consume and produce states) to integrate quantum dataflow in the IR's Static Single Assignment (SSA) graph. Crucially, this allows for a host of optimizations that leverage dataflow analysis. We discuss how to map existing quantum programming languages to the input dialect and how to lower the resulting IR to the optimization dialect. We present a prototype implementation based on MLIR that includes several quantum-specific optimization passes. Our benchmarks show that significant improvements in resource requirements are possible even through static optimization. In contrast to circuit optimization at run time, this is achieved while incurring only a small constant overhead in compilation time, making this a compelling approach for quantum program optimization at application scale. Keywords: intermediate representation, dataflow optimization, quantum compilation, mlir |
[77] |
Ali Javadi-Abhari, Arvin Faruque, Mohammad Javad Dousti, Lukas Svec, Oana
Catu, Amlan Chakrabarti, Chen-Fu Chiang, Seth Vanderwilt, John Black,
Frederic T. Chong, Margaret Martonosi, Martin Suchara, Ken Brown, Massoud
Pedram, and Todd Brun.
Scaffold: Quantum Programming Language.
Technical Report TR-934-12, Princeton University, June 2012.
[ bib |
https ]
Quantum computing is of significant research interest because of its potential to radically alter the performance and asymptotic complexity of certain computations. Over the years, physicists have explored possibilities for how to implement quantum bits and logic devices in hardware. At a higher level, mathematicians and algorithmicists have explored how to express computational problems from diverse fields—such as cryptography, chemical systems simulation, and database search—in terms of mathematical equations potentially implementable in quantum hardware. |
[78] |
Ali Javadi-Abhari, Shruti Patil, Daniel Kudrow, Jeff Heckey, Alexey Lvov,
Frederic T. Chong, and Margaret Martonosi.
ScaffCC: Scalable Compilation and Analysis of
Quantum Programs.
Parallel Computing, 45:2–17, June 2015.
[ bib |
DOI |
arXiv ]
We present ScaffCC, a scalable compilation and analysis framework based on LLVM (Lattner and Adve, 2004), which can be used for compiling quantum computing applications at the logical level. Drawing upon mature compiler technologies, we discuss similarities and differences between compilation of classical and quantum programs, and adapt our methods to optimizing the compilation time and output for the quantum case. Our work also integrates a reversible-logic synthesis tool in the compiler to facilitate coding of quantum circuits. Lastly, we present some useful quantum program analysis scenarios and discuss their implications, specifically with an elaborate discussion of timing analysis for critical path estimation. Our work focuses on bridging the gap between high-level quantum algorithm specifications and low-level physical implementations, while providing good scalability to larger and more interesting problems. |
[79] |
Xiaodong Jia, Andre Kornell, Bert Lindenhovius, Michael Mislove, and Vladimir
Zamdzhiev.
Semantics for Variational Quantum Programming.
Proceedings of the ACM on Programming Languages, 6(POPL):26,
January 2022.
[ bib |
DOI |
arXiv ]
We consider a programming language that can manipulate both classical and quantum information. Our language is type-safe and designed for variational quantum programming, which is a hybrid classical-quantum computational paradigm. The classical subsystem of the language is the Probabilistic FixPoint Calculus (PFPC), which is a lambda calculus with mixed-variance recursive types, term recursion and probabilistic choice. The quantum subsystem is a first-order linear type system that can manipulate quantum information. The two subsystems are related by mixed classical/quantum terms that specify how classical probabilistic effects are induced by quantum measurements, and conversely, how classical (probabilistic) programs can influence the quantum dynamics. We also describe a sound and computationally adequate denotational semantics for the language. Classical probabilistic effects are interpreted using a recently-described commutative probabilistic monad on DCPO. Quantum effects and resources are interpreted in a category of von Neumann algebras that we show is enriched over (continuous) domains. This strong sense of enrichment allows us to develop novel semantic methods that we use to interpret the relationship between the quantum and classical probabilistic effects. By doing so we provide a very detailed denotational analysis that relates domain-theoretic models of classical probabilistic programming to models of quantum programming. Keywords: semantics, probabilistic programming, variational quantum programming |
[80] |
Philippe Jorrand and Simon Perdrix.
Abstract Interpretation Techniques for Quantum Computation.
In Gay and Mackie [55], pages 206–234.
[ bib |
DOI ]
In this chapter, we present applications of abstract interpretation techniques in quantum computing. Quantum computing is a now well-established domain of computer science, and the recent developments of semantic techniques show the vitality of this rapidly growing area. On the other hand, the proof has been made that abstract interpretation is a powerful theory (of “classical” computer science) for comparing more or less precise semantics of the same programming language. In a more general picture, abstract interpretation can be seen as a framework for comparing the precision of several representations of the same dynamic system evolution. In this paper, we point out that abstract interpretation can be fruitfully used in quantum computing: (i) for establishing a hierarchy of quantum semantics and (ii) for analyzing entanglement evolution. Keywords: abstract interpretation |
[81] |
Chan Gu Kang and Hakjoo Oh.
Modular Component-Based Quantum Circuit Synthesis.
Proceedings of the ACM on Programming Languages, 7(OOPSLA1):87,
April 2023.
[ bib |
DOI |
https ]
In this article, we present a novel method for synthesizing quantum circuits from user-supplied components. Given input-output state vectors and component quantum gates, our synthesizer aims to construct a quantum circuit that implements the provided functionality in terms of the supplied component gates. To achieve this, we basically use an enumerative search with pruning. To accelerate the procedure, however, we perform the search and pruning at the module level; instead of simply enumerating candidate circuits by appending component gates in sequence, we stack modules, which are groups of gate operations. With this modular approach, we can effectively reduce the search space by directing the search in a way that bridges the gap between the current circuit and the input-output specification. Evaluation on 17 benchmark problems shows that our technique is highly effective at synthesizing quantum circuits. Our method successfully synthesized 16 out of 17 benchmark circuits in 96.6 seconds on average. On the other hand, the conventional, gate-level synthesis algorithm succeeded in 10 problems with an average time of 639.1 seconds. Our algorithm increased the speed of the baseline by 20.3x for the 10 problems commonly solved by both approaches. Keywords: quantum programming, quantum circuit synthesis |
[82] |
Emanuel Knill.
Conventions for Quantum Pseudocode.
Technical Report LA-UR-96-2724, Los Alamos National Laboratory,
June 1996.
[ bib |
DOI ]
A few conventions for thinking about and writing quantum pseudocode are proposed. The conventions can be used for presenting any quantum algorithm down to the lowest level and are consistent with a quantum random access machine (QRAM) model for quantum computing. In principle a formal version of quantum pseudocode could be used in a future extension of a conventional language. |
[83] |
Martin Kong.
On the Impact of Affine Loop Transformations in Qubit
Allocation.
ACM Transactions on Quantum Computing, 2(3):9, September 2021.
[ bib |
DOI ]
Most quantum compiler transformations and qubit allocation techniques to date are either peep-hole focused or rely on sliding windows that depend on a number of external parameters including the topology of the quantum processor. Thus, global optimization criteria are still lacking. In this article, we explore the synergies and impact of affine loop transformations in the context of qubit allocation and mapping. With this goal in mind, we designed and implemented AXL, a domain specific language and source-to-source compiler for quantum circuits that can be directly described with affine relations. We conduct an extensive evaluation spanning circuits from the recently introduced QUEKO benchmark suite, eight quantum circuits taken from the literature, three distinct coupling graphs, four affine transformations (including the Pluto dependence distance minimization and Feautrier's minimum latency algorithms), four qubit allocators, and two back-end quantum compilers. Our results demonstrate that affine transformations using global optimization criteria can cooperate effectively in several scenarios with quantum qubit mapping algorithms to reduce the circuit depth, size and allocation time. Keywords: qubit allocation, polyhedral model, quantum computing, affine transformations |
[84] |
Andre Kornell, Bert Lindenhovius, and Michael Mislove.
Quantum CPOs.
In Benoît Valiron, Shane Mansfield, Pablo Arrighi, and Prakash
Panangaden, editors, Proceedings of the 17th International Conference on
Quantum Physics and Logic (QPL), Paris, France, June 2–6, 2020, volume 340
of Electronic Proceedings in Theoretical Computer Science, pages
174–187, Waterloo, NSW, Australia, September 2021. Open Publishing
Association.
[ bib |
DOI ]
We introduce the monoidal closed category qCPO of quantum cpos, whose objects are “quantized” analogs of omega-complete partial orders (cpos). The category qCPO is enriched over the category CPO of cpos, and contains both CPO, and the opposite of the category FdAlg of finite-dimensional von Neumann algebras as monoidal subcategories. We use qCPO to construct a sound model for the quantum programming language Proto-Quipper-M (PQM) extended with term recursion, as well as a sound and computationally adequate model for the Linear/Non-Linear Fixpoint Calculus (LNL-FPC), which is both an extension of the Fixpoint Calculus (FPC) with linear types, and an extension of a circuit-free fragment of PQM that includes recursive types. Keywords: proto-quipper-m |
[85] |
Ryan LaRose.
Overview and Comparison of Gate Level Quantum Software
Platforms.
Quantum, 3:130, March 2019.
[ bib |
DOI ]
Quantum computers are available to use over the cloud, but the recent explosion of quantum software platforms can be overwhelming for those deciding on which to use. In this paper, we provide a current picture of the rapidly evolving quantum computing landscape by comparing four software platforms - Forest (pyQuil), Qiskit, ProjectQ, and the Quantum Developer Kit (Q#) - that enable researchers to use real and simulated quantum devices. Our analysis covers requirements and installation, language syntax through example programs, library support, and quantum simulator capabilities for each platform. For platforms that have quantum computer support, we compare hardware, quantum assembly languages, and quantum compilers. We conclude by covering features of each and briefly mentioning other quantum computing software packages. |
[86] |
Ryan LaRose, Andrea Mari, Sarah Kaiser, Peter J. Karalekas, Andre A. Alves,
Piotr Czarnik, Mohamed El Mandouh, Max H. Gordon, Yousef Hindy, Aaron
Robertson, Purva Thakre, Misty Wahl, Danny Samuel, Rahul Mistri, Maxime
Tremblay, Nick Gardner, Nathaniel T. Stemen, Nathan Shammah, and William J.
Zeng.
Mitiq: A software package for error mitigation on noisy
quantum computers.
Quantum, 6:774, August 2022.
[ bib |
DOI |
https ]
We introduce Mitiq, a Python package for error mitigation on noisy quantum computers. Error mitigation techniques can reduce the impact of noise on near-term quantum computers with minimal overhead in quantum resources by relying on a mixture of quantum sampling and classical post-processing techniques. Mitiq is an extensible toolkit of different error mitigation methods, including zero-noise extrapolation, probabilistic error cancellation, and Clifford data regression. The library is designed to be compatible with generic backends and interfaces with different quantum software frameworks. We describe Mitiq using code snippets to demonstrate usage and discuss features and contribution guidelines. We present several examples demonstrating error mitigation on IBM and Rigetti superconducting quantum processors as well as on noisy simulators. |
[87] |
Xuan-Bach Le, Shang-Wei Lin, Jun Sun, and David Sanan.
A Quantum Interpretation of Separating Conjunction for Local
Reasoning of Quantum Programs Based on Separation Logic.
Proceedings of the ACM on Programming Languages, 6(POPL):36,
January 2022.
[ bib |
DOI ]
It is well-known that quantum programs are not only complicated to design but also challenging to verify because the quantum states can have exponential size and require sophisticated mathematics to encode and manipulate. To tackle the state-space explosion problem for quantum reasoning, we propose a Hoare-style inference framework that supports local reasoning for quantum programs. By providing a quantum interpretation of the separating conjunction, we are able to infuse separation logic into our framework and apply local reasoning using a quantum frame rule that is similar to the classical frame rule. For evaluation, we apply our framework to verify various quantum programs including Deutsch-Jozsa's algorithm and Grover's algorithm. Keywords: verification, quantum computing, formal semantics, separation logic |
[88] |
Dongho Lee, Valentin Perrelle, Benoît Valiron, and Zhaowei Xu.
Concrete Categorical Model of a Quantum Circuit Description
Language with Measurement.
In Mikołaj Bojańczy and Chandra Chekuri, editors, 41st
IARCS Annual Conference on Foundations of Software Technology and Theoretical
Computer Science (FSTTCS 2021), volume 213 of Leibniz International
Proceedings in Informatics (LIPIcs), pages 51:1–51:20, Dagstuhl, Germany,
November 2021. Schloss Dagstuhl – Leibniz-Zentrum für Informatik.
[ bib |
DOI ]
In this paper, we introduce dynamic lifting to a quantum circuit-description language, following the Proto-Quipper language approach. Dynamic lifting allows programs to transfer the result of measuring quantum data – qubits – into classical data – booleans – . We propose a type system and an operational semantics for the language and we state safety properties. Next, we introduce a concrete categorical semantics for the proposed language, basing our approach on a recent model from Rios&Selinger for Proto-Quipper-M. Our approach is to construct on top of a concrete category of circuits with measurements a Kleisli category, capturing as a side effect the action of retrieving classical content out of a quantum memory. We then show a soundness result for this semantics. Keywords: categorical semantics, operational semantics, quantum circuit description language, proto-quipper-l, proto-quipper-m, dynamic lifting |
[89] |
Marco Lewis, Sadegh Soudjani, and Paolo Zuliani.
Formal Verification of Quantum Programs: Theory, Tools and
Challenges, October 2021.
[ bib |
arXiv ]
Over the past 27 years, quantum computing has seen a huge rise in interest from both academia and industry. At the current rate, quantum computers are growing in size rapidly backed up by the increase of research in the field. Significant efforts are being made to improve the reliability of quantum hardware and to develop suitable software to program quantum computers. In contrast, the verification of quantum programs has received relatively less attention. The importance of verifying programs is especially important in the quantum setting due to how difficult it is to program complex algorithms correctly on resource-constrained and error-prone quantum hardware. Research into creating verification frameworks for quantum programs has seen recent development, with a variety of tools implemented using a collection of theoretical ideas. This survey aims to be a short introduction into the area of formal verification of quantum programs, bringing together theory and tools developed to date. Further, this survey examines some of the challenges that the field may face in the future, namely the developments of complex quantum algorithms. |
[90] |
Gushu Li, Li Zhou, Nengkun Yu, Yufei Ding, Mingsheng Ying, and Yuan Xie.
Projection-Based Runtime Assertions for Testing and Debugging
Quantum Programs.
Proceedings of the ACM on Programming Languages, 4(OOPSLA):150,
November 2020.
[ bib |
DOI ]
In this paper, we propose Proq, a runtime assertion scheme for testing and debugging quantum programs on a quantum computer. The predicates in Proq are represented by projections (or equivalently, closed subspaces of the state space), following Birkhoff-von Neumann quantum logic. The satisfaction of a projection by a quantum state can be directly checked upon a small number of projective measurements rather than a large number of repeated executions. On the theory side, we rigorously prove that checking projection-based assertions can help locate bugs or statistically assure that the semantic function of the tested program is close to what we expect, for both exact and approximate quantum programs. On the practice side, we consider hardware constraints and introduce several techniques to transform the assertions, making them directly executable on the measurement-restricted quantum computers. We also propose to achieve simplified assertion implementation using local projection technique with soundness guaranteed. We compare Proq with existing quantum program assertions and demonstrate the effectiveness and efficiency of Proq by its applications to assert two sophisticated quantum algorithms, the Harrow-Hassidim-Lloyd algorithm and Shor's algorithm. Keywords: assertion, quantum computing, program testing, quantum programming |
[91] |
Liyi Li, Finn Voichick, Kesha Hietala, Yuxiang Peng, Xiaodi Wu, and Michael
Hicks.
Verified Compilation of Quantum Oracles.
Proceedings of the ACM on Programming Languages,
6(OOPSLA2):146, October 2022.
[ bib |
DOI |
arXiv |
https ]
Quantum algorithms often apply classical operations, such as arithmetic or predicate checks, over a quantum superposition of classical data; these so-called oracles are often the largest components of a quantum program. To ease the construction of efficient, correct oracle functions, this paper presents VQO, a high-assurance framework implemented with the Coq proof assistant. The core of VQO is OQASM, the oracle quantum assembly language. OQASM operations move qubits between two different bases via the quantum Fourier transform, thus admitting important optimizations, but without inducing entanglement and the exponential blowup that comes with it. OQASM's design enabled us to prove correct VQO's compilers—from a simple imperative language called OQIMP to OQASM, and from OQASM to SQIR, a general-purpose quantum assembly language—and allowed us to efficiently test properties of OQASM programs using the QuickChick property-based testing framework. We have used VQO to implement a variety of arithmetic and geometric operators that are building blocks for important oracles, including those used in Shor's and Grover's algorithms. We found that VQO's QFT-based arithmetic oracles require fewer qubits, sometimes substantially fewer, than those constructed using “classical” gates; VQO's versions of the latter were nevertheless on par with or better than (in terms of both qubit and gate counts) oracles produced by Quipper, a state-of-the-art but unverified quantum programming platform. Keywords: quantum oracle, type system, compiler verification, programming language design |
[92] |
Yangjia Li and Dominique Unruh.
Quantum Relational Hoare Logic with Expectations.
In Nikhil Bansal, Emanuela Merelli, and James Worrell, editors,
48th International Colloquium on Automata, Languages, and Programming (ICALP
2021), volume 198 of Leibniz International Proceedings in Informatics
(LIPIcs), pages 136:1–136:20, Dagstuhl, Germany, July 2021. Schloss
Dagstuhl – Leibniz-Zentrum für Informatik.
[ bib |
DOI ]
We present a variant of the quantum relational Hoare logic from (Unruh, POPL 2019) that allows us to use “expectations” in pre- and postconditions. That is, when reasoning about pairs of programs, our logic allows us to quantitatively reason about how much certain pre-/postconditions are satisfied that refer to the relationship between the programs inputs/outputs. Keywords: quantum cryptography, hoare logic, formal verification |
[93] |
Yangjia Li and Mingsheng Ying.
Algorithmic Analysis of Termination Problems for Quantum
Programs.
Proceedings of the ACM on Programming Languages, 2(POPL):35,
December 2017.
[ bib |
DOI ]
We introduce the notion of linear ranking super-martingale (LRSM) for quantum programs (with nondeterministic choices, namely angelic and demonic choices). Several termination theorems are established showing that the existence of the LRSMs of a quantum program implies its termination. Thus, the termination problems of quantum programs is reduced to realisability and synthesis of LRSMs. We further show that the realisability and synthesis problem of LRSMs for quantum programs can be reduced to an SDP (Semi-Definite Programming) problem, which can be settled with the existing SDP solvers. The techniques developed in this paper are used to analyse the termination of several example quantum programs, including quantum random walks and quantum Bernoulli factory for random number generation. This work is essentially a generalisation of constraint-based approach to the corresponding problems for probabilistic programs developed in the recent literature by adding two novel ideas: (1) employing the fundamental Gleason's theorem in quantum mechanics to guide the choices of templates; and (2) a generalised Farkas' lemma in terms of observables (Hermitian operators) in quantum physics. Keywords: sdp (semi-definite programming), quantum bernoulli factory, quantum programming, quantum random walk, ranking function, super-martingale, termination |
[94] |
Bert Lindenhovius, Michael Mislove, and Vladimir Zamdzhiev.
Enriching a Linear/Non-Linear Lambda Calculus: A
Programming Language for String Diagrams.
In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in
Computer Science, LICS '18, pages 659–668, New York, NY, USA, July
2018. Association for Computing Machinery.
[ bib |
DOI |
arXiv ]
Linear/non-linear (LNL) models, as described by Benton, soundly model a LNL term calculus and LNL logic closely related to intuitionistic linear logic. Every such model induces a canonical enrichment that we show soundly models a LNL lambda calculus for string diagrams, introduced by Rios and Selinger (with primary application in quantum computing). Our abstract treatment of this language leads to simpler concrete models compared to those presented so far. We also extend the language with general recursion and prove soundness. Finally, we present an adequacy result for the diagram-free fragment of the language which corresponds to a modified version of Benton and Wadler's adjoint calculus with recursion. Keywords: categorical semantics, string diagrams, enriched category theory, programming languages, quantum computing, proto-quipper-m |
[95] |
Junyi Liu, Bohua Zhan, Shuling Wang, Shenggang Ying, Tao Liu, Yangjia Li,
Mingsheng Ying, and Naijun Zhan.
Formal Verification of Quantum Algorithms Using Quantum
Hoare Logic.
In Isil Dillig and Serdar Tasiran, editors, Computer Aided
Verification (CAV '19), volume 11562 of Lecture Notes in Computer
Science, pages 187–207, Cham, July 2019. Springer International
Publishing.
[ bib |
DOI ]
We formalize the theory of quantum Hoare logic (QHL) [TOPLAS 33(6),19], an extension of Hoare logic for reasoning about quantum programs. In particular, we formalize the syntax and semantics of quantum programs in Isabelle/HOL, write down the rules of quantum Hoare logic, and verify the soundness and completeness of the deduction system for partial correctness of quantum programs. As preliminary work, we formalize some necessary mathematical background in linear algebra, and define tensor products of vectors and matrices on quantum variables. As an application, we verify the correctness of Grover's search algorithm. To our best knowledge, this is the first time a Hoare logic for quantum programs is formalized in an interactive theorem prover, and used to verify the correctness of a nontrivial quantum algorithm. Keywords: hoare logic, qhlprover |
[96] |
Junyi Liu, Bohua Zhan, Shuling Wang, Shenggang Ying, Tao Liu, Yangjia Li,
Mingsheng Ying, and Naijun Zhan.
Quantum Hoare Logic.
Archive of Formal Proofs, 2019, March 2019.
[ bib |
.html ]
We formalize quantum Hoare logic [TOPLAS 33(6),19]. In particular, we specify the syntax and denotational semantics of a simple model of quantum programs. Then, we write down the rules of quantum Hoare logic for partial correctness, and show the soundness and completeness of the resulting proof system. As an application, we verify the correctness of Grover's algorithm. Keywords: hoare logic, qhlprover |
[97] |
Mohamed Yousri Mahmoud and Amy P. Felty.
Formalization of Metatheory of the Quipper Quantum
Programming Language in a Linear Logic.
Journal of Automated Reasoning, 63(4):967–1002, June 2019.
[ bib |
DOI |
arXiv ]
We develop a linear logical framework within the Hybrid system and use it to reason about the type system of a quantum lambda calculus. In particular, we consider a practical version of the calculus called Proto-Quipper, which contains the core of Quipper. Quipper is a quantum programming language under active development and recently has gained much popularity among the quantum computing communities. Hybrid is a system that is designed to support the use of higher-order abstract syntax for representing and reasoning about formal systems implemented in the Coq Proof Assistant. In this work, we extend the system with a linear specification logic (SL) in order to reason about the linear type system of Quipper. To this end, we formalize the semantics of Proto-Quipper by encoding the typing and evaluation rules in the SL, and prove type soundness. Keywords: proto-quipper, quantum programming languages, linear logic, hybrid, higher-order abstract syntax, coq |
[98] |
Alexander McCaskey and Thien Nguyen.
A MLIR Dialect for Quantum Assembly Languages.
In 2021 IEEE International Conference on Quantum Computing and
Engineering (QCE), pages 255–264, Los Alamitos, CA, USA, oct 2021. IEEE
Computer Society.
[ bib |
DOI |
arXiv ]
We demonstrate the utility of the Multi-Level Intermediate Representation (MLIR) for quantum computing. Specifically, we extend MLIR with a new quantum dialect that enables the expression and compilation of common quantum assembly languages. The true utility of this dialect is in its ability to be lowered to the LLVM intermediate representation (IR) in a manner that is adherent to the quantum intermediate representation (QIR) specification recently proposed by Microsoft. We leverage a qcor-enabled implementation of the QIR quantum runtime API to enable a retargetable (quantum hardware agnostic) compiler workflow mapping quantum languages to hybrid quantum-classical binary executables and object code. We evaluate and demonstrate this novel compiler workflow with quantum programs written in OpenQASM 2.0. We provide concrete examples detailing the generation of MLIR from OpenQASM source files, the lowering process from MLIR to LLVM IR, and ultimately the generation of executable binaries targeting available quantum processors. Keywords: quantum computing, quantum programming, quantum simulation, programming languages, mlir |
[99] |
Alexander McCaskey, Thien Nguyen, Anthony Santana, Daniel Claudino, Tyler
Kharazi, and Hal Finkel.
Extending C++ for Heterogeneous Quantum-Classical Computing.
ACM Transactions on Quantum Computing, 2(2):6, June 2021.
[ bib |
DOI |
arXiv ]
We present qcor—a language extension to C++ and compiler implementation that enables heterogeneous quantum-classical programming, compilation, and execution in a single-source context. Our work provides a first-of-its-kind C++ compiler enabling high-level quantum kernel (function) expression in a quantum-language agnostic manner, as well as a hardware-agnostic, retargetable compiler workflow targeting a number of physical and virtual quantum computing backends. qcor leverages novel Clang plugin interfaces and builds upon the XACC system-level quantum programming framework to provide a state-of-the-art integration mechanism for quantum-classical compilation that leverages the best from the community at-large. qcor translates quantum kernels ultimately to the XACC intermediate representation, and provides user-extensible hooks for quantum compilation routines like circuit optimization, analysis, and placement. This work details the overall architecture and compiler workflow for qcor, and provides a number of illuminating programming examples demonstrating its utility for near-term variational tasks, quantum algorithm expression, and feed-forward error correction schemes. Keywords: domain specific languages, quantum programming, quantum computing, compilers |
[100] |
Giulia Meuli, Mathias Soeken, Martin Roetteler, and Thomas Häner.
Enabling Accuracy-Aware Quantum Compilers Using Symbolic
Resource Estimation.
Proceedings of the ACM on Programming Languages, 4(OOPSLA):130,
November 2020.
[ bib |
DOI ]
Approximation errors must be taken into account when compiling quantum programs into a low-level gate set. We present a methodology that tracks such errors automatically and then optimizes accuracy parameters to guarantee a specified overall accuracy while aiming to minimize the implementation cost in terms of quantum gates. The core idea of our approach is to extract functions that specify the optimization problem directly from the high-level description of the quantum program. Then, custom compiler passes optimize these functions, turning them into (near-)symbolic expressions for (1) the total error and (2) the implementation cost (e.g., total quantum gate count). All unspecified parameters of the quantum program will show up as variables in these expressions, including accuracy parameters. After solving the corresponding optimization problem, a circuit can be instantiated from the found solution. We develop two prototype implementations, one in C++ based on Clang/LLVM, and another using the Q# compiler infrastructure. We benchmark our prototypes on typical quantum computing programs, including the quantum Fourier transform, quantum phase estimation, and Shor's algorithm. Keywords: quantum algorithms, approximation errors, resource estimation, quantum programming, quantum computing |
[101] |
Microsoft.
Q# Language Specification, September 2020.
[ bib |
https ]
Q# is part of Microsoft's Quantum Development Kit and provides rich IDE support and tools for program visualization and analysis. Our goal is to support the development of future large-scale applications while supporting user's first efforts in that direction on current quantum hardware. |
[102] |
Michele Mosca, Martin Roetteler, and Peter Selinger.
Quantum Programming Languages (Dagstuhl Seminar 18381).
Dagstuhl Reports, 8(9):112–132, March 2019.
[ bib |
DOI |
https ]
This report documents the program and the outcomes of Dagstuhl Seminar 18381 “Quantum Programming Languages”, which brought together researchers from quantum computing and classical programming languages. Keywords: compilers, functional programming, quantum computing, reversible computing, verification |
[103] |
Thien Nguyen and Alexander McCaskey.
Retargetable Optimizing Compilers for Quantum Accelerators via a
Multilevel Intermediate Representation.
IEEE Micro, 42(5):17–33, September 2022.
[ bib |
DOI |
arXiv ]
We present a multilevel quantum-classical intermediate representation (IR) that enables an optimizing, retargetable compiler for available quantum languages. Our work builds upon the multilevel intermediate representation (MLIR) framework and leverages its unique progressive lowering capabilities to map quantum languages to the low-level virtual machine (LLVM) machine-level IR. We provide both quantum and classical optimizations via the MLIR pattern rewriting subsystem and standard LLVM optimization passes, and demonstrate the programmability, compilation, and execution of our approach via standard benchmarks and test cases. In comparison to other standalone language and compiler efforts available today, our work results in compile times that are 1,000× faster than standard Pythonic approaches, and 5-10× faster than comparative standalone quantum language compilers. Our compiler provides quantum resource optimizations via standard programming patterns that result in a 10× reduction in entangling operations, a common source of program noise. We see this work as a vehicle for rapid quantum compiler prototyping. Keywords: quantum computing, quantum programming, programming languages, mlir |
[104] |
Michael A. Nielsen and Isaac L. Chuang.
Quantum Computation and Quantum Information: 10th Anniversary
Edition.
Cambridge University Press, Cambridge, December 2010.
[ bib |
DOI ]
One of the most cited books in physics of all time, Quantum Computation and Quantum Information remains the best textbook in this exciting field of science. This 10th anniversary edition includes an introduction from the authors setting the work in context. This comprehensive textbook describes such remarkable effects as fast quantum algorithms, quantum teleportation, quantum cryptography and quantum error-correction. Quantum mechanics and computer science are introduced before moving on to describe what a quantum computer is, how it can be used to solve problems faster than 'classical' computers and its real-world implementation. It concludes with an in-depth treatment of quantum information. Containing a wealth of figures and exercises, this well-known textbook is ideal for courses on the subject, and will interest beginning graduate students and researchers in physics, computer science, mathematics, and electrical engineering. |
[105] | Bernhard Ömer. Structured Quantum Programming. PhD thesis, Vienna University of Technology, May 2003. [ bib | .pdf ] |
[106] |
Michele Pagani, Peter Selinger, and Benoît Valiron.
Applying Quantitative Semantics to Higher-Order Quantum
Computing.
In Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on
Principles of Programming Languages, POPL '14, pages 647–658, New York, NY,
USA, January 2014. Association for Computing Machinery.
[ bib |
DOI |
arXiv ]
Finding a denotational semantics for higher order quantum computation is a long-standing problem in the semantics of quantum programming languages. Most past approaches to this problem fell short in one way or another, either limiting the language to an unusably small finitary fragment, or giving up important features of quantum physics such as entanglement. In this paper, we propose a denotational semantics for a quantum lambda calculus with recursion and an infinite data type, using constructions from quantitative semantics of linear logic. Keywords: higher-order, quantum computation, completely positive maps, categorical model, functional programming |
[107] |
Matteo Paltenghi and Michael Pradel.
Bugs in Quantum Computing Platforms: An Empirical Study.
Proceedings of the ACM on Programming Languages, 6(OOPSLA1):86,
April 2022.
[ bib |
DOI ]
The interest in quantum computing is growing, and with it, the importance of software platforms to develop quantum programs. Ensuring the correctness of such platforms is important, and it requires a thorough understanding of the bugs they typically suffer from. To address this need, this paper presents the first in-depth study of bugs in quantum computing platforms. We gather and inspect a set of 223 real-world bugs from 18 open-source quantum computing platforms. Our study shows that a significant fraction of these bugs (39.9%) are quantum-specific, calling for dedicated approaches to prevent and find them. The bugs are spread across various components, but quantum-specific bugs occur particularly often in components that represent, compile, and optimize quantum programming abstractions. Many quantum-specific bugs manifest through unexpected outputs, rather than more obvious signs of misbehavior, such as crashes. Finally, we present a hierarchy of recurrent bug patterns, including ten novel, quantum-specific patterns. Our findings not only show the importance and prevalence bugs in quantum computing platforms, but they help developers to avoid common mistakes and tool builders to tackle the challenge of preventing, finding, and fixing these bugs. Keywords: quantum computing platform, empirical study, software bugs |
[108] |
Luca Paolini, Mauro Piccolo, and Margherita Zorzi.
QPCF: Higher-Order Languages and Quantum
Circuits.
Journal of Automated Reasoning, 63(4):941–966, March 2019.
[ bib |
DOI |
arXiv ]
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. |
[109] |
Luca Paolini, Luca Roversi, and Margherita Zorzi.
Quantum Programming Made Easy.
In Thomas Ehrhard, Maribel Fernández, Valeria de Paiva, and
Lorenzo Tortora de Falco, editors, Proceedings Joint International
Workshop on Linearity & Trends in Linear Logic and Applications
(Linearity-TLLA '18), Oxford, UK, 7–8 July 2018, volume 292 of
Electronic Proceedings in Theoretical Computer Science, pages 133–147.
Open Publishing Association, April 2019.
[ bib |
DOI ]
We present IQu, namely a quantum programming language that extends Reynold's Idealized Algol, the paradigmatic core of Algol-like languages. IQu combines imperative programming with high-order features, mediated by a simple type theory. IQu mildly merges its quantum features with the classical programming style that we can experiment through Idealized Algol, the aim being to ease a transition towards the quantum programming world. The proposed extension is done along two main directions. First, IQu makes the access to quantum co-processors by means of quantum stores. Second, IQu includes some support for the direct manipulation of quantum circuits, in accordance with recent trends in the development of quantum programming languages. Finally, we show that IQu is quite effective in expressing well-known quantum algorithms. |
[110] |
Luca Paolini and Margherita Zorzi.
qPCF: A Language for Quantum Circuit Computations.
In Theory and Applications of Models of Computation (TAMC '17),
volume 10185 of Lecture Notes in Computer Science, pages 455–469,
Cham, April 2017. Springer International Publishing.
[ bib |
DOI ]
We propose qPCF, a functional language able to define and manipulate quantum circuits in an easy and intuitive way. qPCF follows the tradition of “quantum data & classical control” languages, inspired to the QRAM model. Ideally, qPCF computes finite circuit descriptions which are offloaded to a quantum co-processor (i.e. a quantum device) for the execution. qPCF extends PCF with a new kind of datatype: quantum circuits. The typing of qPCF is quite different from the mainstream of “quantum data & classical control” languages that involves linear/exponential modalities. qPCF uses a simple form of dependent types to manage circuits and an implicit form of monad to manage quantum states via a destructive-measurement operator. Keywords: quantum circuits, classical control, quantum programming languages |
[111] |
Anouk Paradis, Benjamin Bichsel, Samuel Steffen, and Martin Vechev.
Unqomp: Synthesizing Uncomputation in Quantum Circuits.
In Proceedings of the 42nd ACM SIGPLAN International Conference
on Programming Language Design and Implementation, PLDI '21, pages
222–236, New York, NY, USA, June 2021. Association for Computing
Machinery.
[ bib |
DOI ]
A key challenge when writing quantum programs is the need for uncomputation: temporary values produced during the computation must be reset to zero before they can be safely discarded. Unfortunately, most existing quantum languages require tedious manual uncomputation, often leading to inefficient and error-prone programs. We present Unqomp, the first procedure to automatically synthesize uncomputation in a given quantum circuit. Unqomp can be readily integrated into popular quantum languages, allowing the programmer to allocate and use temporary values analogously to classical computation, knowing they will be uncomputed by Unqomp. Our evaluation shows that programs leveraging Unqomp are not only shorter (-19% on average), but also generate more efficient circuits (-71% gates and -19% qubits on average). Keywords: quantum Circuits, uncomputation, synthesis |
[112] |
Jennifer Paykin.
Linear/Non-Linear Types for Embedded Domain-Specific
Languages.
PhD thesis, University of Pennsylvania, Philadelphia, PA, USA,
August 2018.
Publicly Accessible Penn Dissertations. 2752.
[ bib |
https ]
Domain-specific languages are often embedded inside of general-purpose host languages so that the embedded language can take advantage of host-language data structures, libraries, and tools. However, when the domain-specific language uses linear types, existing techniques for embedded languages fall short. Linear type systems, which have applications in a wide variety of programming domains including mutable state, I/O, concurrency, and quantum computing, can manipulate embedded non-linear data via the linear type !σ. However, prior work has not been able to produce linear embedded languages that have full and easy access to host-language data, libraries, and tools. |
[113] |
Jennifer Paykin, Robert Rand, and Steve Zdancewic.
QWIRE: A Core Language for Quantum Circuits.
In Proceedings of the 44th ACM SIGPLAN Symposium on Principles
of Programming Languages, POPL '17, pages 846–858, New York, NY, USA,
January 2017. Association for Computing Machinery.
[ bib |
DOI |
.pdf ]
This paper introduces QWIRE (“choir”), a language for defining quantum circuits and an interface for manipulating them inside of an arbitrary classical host language. QWIRE is minimal—it contains only a few primitives—and sound with respect to the physical properties entailed by quantum mechanics. At the same time, QWIRE is expressive and highly modular due to its relationship with the host language, mirroring the QRAM model of computation that places a quantum computer (controlled by circuits) alongside a classical computer (controlled by the host language). Keywords: linear types, denotational semantics, quantum circuits, quantum programming languages |
[114] |
Jennifer Paykin and Steve Zdancewic.
A HoTT Quantum Equational Theory (Extended Version),
April 2019.
QPL '19.
[ bib |
arXiv ]
This paper presents an equational theory for the QRAM model of quantum computation, formulated as an embedded language inside of homotopy type theory. The embedded language approach is highly expressive, and reflects the style of state-of-the art quantum languages like Quipper and QWIRE. The embedding takes advantage of features of homotopy type theory to encode unitary transformations as higher inductive paths, simplifying the presentation of an equational theory. We prove that this equational theory is sound and complete with respect to established models of quantum computation. |
[115] |
Romain Péchoux, Simon Perdrix, Mathys Rennela, and Vladimir Zamdzhiev.
Quantum Programming with Inductive Datatypes: Causality and
Affine Type Theory.
In Jean Goubault-Larrecq and Barbara König, editors,
Foundations of Software Science and Computation Structures, FoSSaCS 2020,
volume 12077 of Lecture Notes in Computer Science, pages 562–581,
Cham, April 2020. Springer International Publishing.
[ bib |
DOI ]
Inductive datatypes in programming languages allow users to define useful data structures such as natural numbers, lists, trees, and others. In this paper we show how inductive datatypes may be added to the quantum programming language QPL. We construct a sound categorical model for the language and by doing so we provide the first detailed semantic treatment of user-defined inductive datatypes in quantum programming. We also show our denotational interpretation is invariant with respect to big-step reduction, thereby establishing another novel result for quantum programming. Compared to classical programming, this property is considerably more difficult to prove and we demonstrate its usefulness by showing how it immediately implies computational adequacy at all types. To further cement our results, our semantics is entirely based on a physically natural model of von Neumann algebras, which are mathematical structures used by physicists to study quantum mechanics. Keywords: quantum programming, inductive types, adequacy |
[116] |
Anurudh Peduri, Siddharth Bhat, and Tobias Grosser.
QSSA: An SSA-Based IR for Quantum Computing.
In Proceedings of the 31st ACM SIGPLAN International Conference
on Compiler Construction, pages 2–14, New York, NY, USA, March 2022.
Association for Computing Machinery.
[ bib |
DOI |
arXiv ]
Quantum computing hardware has progressed rapidly. Simultaneously, there has been a proliferation of programming languages and program optimization tools for quantum computing. Existing quantum compilers use intermediate representations (IRs) where quantum programs are described as circuits. Such IRs fail to leverage existing work on compiler optimizations. In such IRs, it is non-trivial to statically check for physical constraints such as the no-cloning theorem, which states that qubits cannot be copied. We introduce QSSA, a novel quantum IR based on static single assignment (SSA) that enables decades of research in compiler optimizations to be applied to quantum compilation. QSSA models quantum operations as being side-effect-free. The inputs and outputs of the operation are in one-to-one correspondence; qubits cannot be created or destroyed. As a result, our IR supports a static analysis pass that verifies no-cloning at compile-time. The quantum circuit is fully encoded within the def-use chain of the IR, allowing us to leverage existing optimization passes on SSA representations such as redundancy elimination and dead-code elimination. Running our QSSA-based compiler on the QASMBench and IBM Quantum Challenge datasets, we show that our optimizations perform comparably to IBM's Qiskit quantum compiler infrastructure. QSSA allows us to represent, analyze, and transform quantum programs using the robust theory of SSA representations, bringing quantum compilation into the realm of well-understood theory and practice. Keywords: ssa, quantum circuits, compilers, intermediate representations, optimization, mlir |
[117] |
Yuxiang Peng, Kesha Hietala, Runzhou Tao, Liyi Li, Robert Rand, Michael Hicks,
and Xiaodi Wu.
A Formally Certified End-to-End Implementation of Shor's
Factorization Algorithm, April 2022.
[ bib |
arXiv |
https ]
Quantum computing technology may soon deliver revolutionary improvements in algorithmic performance, but these are only useful if computed answers are correct. While hardware-level decoherence errors have garnered significant attention, a less recognized obstacle to correctness is that of human programming errors – “bugs”. Techniques familiar to most programmers from the classical domain for avoiding, discovering, and diagnosing bugs do not easily transfer, at scale, to the quantum domain because of its unique characteristics. To address this problem, we have been working to adapt formal methods to quantum programming. With such methods, a programmer writes a mathematical specification alongside their program, and semi-automatically proves the program correct with respect to it. The proof's validity is automatically confirmed – certified – by a “proof assistant”. Formal methods have successfully yielded high-assurance classical software artifacts, and the underlying technology has produced certified proofs of major mathematical theorems. As a demonstration of the feasibility of applying formal methods to quantum programming, we present the first formally certified end-to-end implementation of Shor's prime factorization algorithm, developed as part of a novel framework for applying the certified approach to general applications. By leveraging our framework, one can significantly reduce the effects of human errors and obtain a high-assurance implementation of large-scale quantum applications in a principled way. |
[118] |
Yuxiang Peng, Mingsheng Ying, and Xiaodi Wu.
Algebraic Reasoning of Quantum Programs via Non-Idempotent
Kleene Algebra.
In Proceedings of the 43rd ACM SIGPLAN International Conference
on Programming Language Design and Implementation, PLDI '22, pages
657–670, New York, NY, USA, June 2022. Association for Computing
Machinery.
[ bib |
DOI |
arXiv ]
We investigate the algebraic reasoning of quantum programs inspired by the success of classical program analysis based on Kleene algebra. One prominent example of such is the famous Kleene Algebra with Tests (KAT), which has furnished both theoretical insights and practical tools. The succinctness of algebraic reasoning would be especially desirable for scalable analysis of quantum programs, given the involvement of exponential-size matrices in most of the existing methods. A few key features of KAT including the idempotent law and the nice properties of classical tests, however, fail to hold in the context of quantum programs due to their unique quantum features, especially in branching. We propose the Non-idempotent Kleena Algebra (NKA) as a natural alternative, and identify complete and sound semantic models for NKA as well as their quantum interpretations. In light of applications of KAT, we demonstrate algebraic proofs in NKA of quantum compiler optimization and the normal form of quantum while-programs. Moreover, we extend NKA with Tests (i.e., NKAT), where tests model quantum predicates following effect algebra, and illustrate how to encode propositional quantum Hoare logic as NKAT theorems. Keywords: non-idempotent kleene algebra, compiler optimization, normal form theorem, quantum hoare logic |
[119] |
QIR Alliance.
QIR Specification, November 2021.
Also see https://qir-alliance.org.
[ bib |
https ]
The QIR specification is an effort of the QIR Alliance. It defines how to represent quantum programs within the LLVM IR. |
[120] |
Qiskit Community.
Qiskit: An Open-Source Framework for Quantum Computing,
March 2017.
[ bib |
DOI |
https ]
Qiskit is an open-source framework for working with noisy quantum computers at the level of pulses, circuits, and algorithms. https://qiskit.org |
[121] |
Quingo Development Team.
Quingo: A Programming Framework for Heterogeneous
Quantum-Classical Computing with NISQ Features.
ACM Transactions on Quantum Computing, 2(4):19, December 2021.
[ bib |
DOI |
https ]
The increasing control complexity of Noisy Intermediate-Scale Quantum (NISQ) systems underlines the necessity of integrating quantum hardware with quantum software. While mapping heterogeneous quantum-classical computing (HQCC) algorithms to NISQ hardware for execution, we observed a few dissatisfactions in quantum programming languages (QPLs), including difficult mapping to hardware, limited expressiveness, and counter-intuitive code. In addition, noisy qubits require repeatedly performed quantum experiments, which explicitly operate low-level configurations, such as pulses and timing of operations. This requirement is beyond the scope or capability of most existing QPLs.We summarize three execution models to depict the quantum-classical interaction of existing QPLs. Based on the refined HQCC model, we propose the Quingo framework to integrate and manage quantum-classical software and hardware to provide the programmability over HQCC applications and map them to NISQ hardware. We propose a six-phase quantum program life-cycle model matching the refined HQCC model, which is implemented by a runtime system. We also propose the Quingo programming language, an external domain-specific language highlighting timer-based timing control and opaque operation definition, which can be used to describe quantum experiments. We believe the Quingo framework could contribute to the clarification of key techniques in the design of future HQCC systems. Keywords: nisq, quantum compilation, timing control, quantum programming framework, quantum programming language |
[122] |
Robert Rand.
Verification Logics for Quantum Programs, March 2016.
Submitted as a qualifying examination (WPE-II) for the PhD program at
the University of Pennsylvania.
[ bib |
arXiv ]
We survey the landscape of Hoare logics for quantum programs. We review three papers: “Reasoning about imperative quantum programs” by Chadha, Mateus and Sernadas; “A logic for formal verification of quantum programs” by Yoshihiko Kakutani; and “Floyd-hoare logic for quantum programs” by Mingsheng Ying. We compare the mathematical foundations of the logics, their underlying languages, and the expressivity of their assertions. We also use the languages to verify the Deutsch–Jozsa Algorithm, and discuss their relative usability in practice. Keywords: hoare logic |
[123] |
Robert Rand.
Formally Verified Quantum Programming.
PhD thesis, University of Pennsylvania, Philadelphia, PA, USA,
November 2018.
Publicly Accessible Penn Dissertations. 3175.
[ bib |
https ]
The field of quantum mechanics predates computer science by at least ten years, the time between the publication of the Schrodinger equation and the Church-Turing thesis. It took another fifty years for Feynman to recognize that harnessing quantum mechanics is necessary to efficiently simulate physics and for David Deutsch to propose the quantum Turing machine. After thirty more years, we are finally getting close to the first general-purpose quantum computers based upon prototypes by IBM, Intel, Google and others. |
[124] |
Robert Rand, Kesha Hietala, and Michael Hicks.
Formal Verification vs. Quantum Uncertainty.
In Benjamin S. Lerner, Rastislav Bodík, and Shriram
Krishnamurthi, editors, 3rd Summit on Advances in Programming Languages
(SNAPL 2019), volume 136 of Leibniz International Proceedings in
Informatics (LIPIcs), pages 12:1–12:11, Dagstuhl, Germany, July 2019.
Schloss Dagstuhl – Leibniz-Zentrum für Informatik.
[ bib |
DOI ]
Quantum programming is hard: Quantum programs are necessarily probabilistic and impossible to examine without disrupting the execution of a program. In response to this challenge, we and a number of other researchers have written tools to verify quantum programs against their intended semantics. This is not enough. Verifying an idealized semantics against a real world quantum program doesn't allow you to confidently predict the program's output. In order to have verification that works, you need both an error semantics related to the hardware at hand (this is necessarily low level) and certified compilation to the that same hardware. Once we have these two things, we can talk about an approach to quantum programming where we start by writing and verifying programs at a high level, attempt to verify properties of the compiled code, and repeat as necessary. Keywords: formal verification, quantum computing, programming languages, quantum error correction, certified compilation, nisq |
[125] |
Robert Rand, Jennifer Paykin, Dongho Lee, and Steve Zdancewic.
ReQWIRE: Reasoning about Reversible Quantum
Circuits.
In Peter Selinger and Giulio Chiribella, editors, Proceedings of
the 15th International Conference on Quantum Physics and Logic (QPL),
Halifax, Canada, June 3–7, 2018, volume 287 of Electronic Proceedings
in Theoretical Computer Science, pages 299–312, Waterloo, NSW, Australia,
January 2019. Open Publishing Association.
[ bib |
DOI ]
Common quantum algorithms make heavy use of ancillae: scratch qubits that are initialized at some state and later returned to that state and discarded. Existing quantum circuit languages let programmers assert that a qubit has been returned to the |0> state before it is discarded, allowing for a range of optimizations. However, existing languages do not provide the tools to verify these assertions, introducing a potential source of errors. In this paper we present methods for verifying that ancillae are discarded in the desired state, and use these methods to implement a verified compiler from classical functions to quantum oracles. |
[126] |
Robert Rand, Jennifer Paykin, and Steve Zdancewic.
Phantom Types for Quantum Programs, January 2018.
Talk at The Fourth International Workshop on Coq for Programming
Languages (CoqPL '18).
[ bib |
https ]
We explore the design space of using dependent types to type check and verify quantum circuits. We weigh the trade-offs between the expressivity of dependent types against the costs imposed by large proof terms. We propose lightweight dependent types, or phantom types, as a middle ground, which provide useful type information for programming while specifying the properties to be externally verified. |
[127] |
Robert Rand, Jennifer Paykin, and Steve Zdancewic.
QWIRE Practice: Formal Verification of Quantum Circuits
in Coq.
In Bob Coecke and Aleks Kissinger, editors, Proceedings of the
14th International Conference on Quantum Physics and Logic (QPL), Nijmegen,
the Netherlands, July 3–7, 2017, volume 266 of Electronic Proceedings
in Theoretical Computer Science, pages 119–132, Waterloo, NSW, Australia,
February 2018. Open Publishing Association.
[ bib |
DOI ]
We describe an embedding of the QWIRE quantum circuit language in the Coq proof assistant. This allows programmers to write quantum circuits using high-level abstractions and to prove properties of those circuits using Coq's theorem proving features. The implementation uses higher-order abstract syntax to represent variable binding and provides a type-checking algorithm for linear wire types, ensuring that quantum circuits are well-formed. We formalize a denotational semantics that interprets QWIRE circuits as superoperators on density matrices, and prove the correctness of some simple quantum programs. |
[128] |
Robert Rand, Aarthi Sundaram, Kartik Singhal, and Brad Lackey.
Gottesman Types for Quantum Programs.
In Benoît Valiron, Shane Mansfield, Pablo Arrighi, and Prakash
Panangaden, editors, Proceedings of the 17th International Conference on
Quantum Physics and Logic (QPL), Paris, France, June 2–6, 2020, volume 340
of Electronic Proceedings in Theoretical Computer Science, pages
279–290, Waterloo, NSW, Australia, September 2021. Open Publishing
Association.
[ bib |
DOI |
https ]
The Heisenberg representation of quantum operators provides a powerful technique for reasoning about quantum circuits, albeit those restricted to the common (non-universal) Clifford set H, S and CNOT. The Gottesman-Knill theorem showed that we can use this representation to efficiently simulate Clifford circuits. We show that Gottesman's semantics for quantum programs can be treated as a type system, allowing us to efficiently characterize a common subset of quantum programs. We also show that it can be extended beyond the Clifford set to partially characterize a broad range of programs. We apply these types to reason about separable states and the superdense coding algorithm. Keywords: quantum computing, type systems, gottesman types |
[129] |
Mathys Rennela and Sam Staton.
Classical Control and Quantum Circuits in Enriched
Category Theory.
In The Thirty-Third Conference on the Mathematical Foundations
of Programming Semantics (MFPS XXXIII), volume 336 of Electronic Notes
in Theoretical Computer Science, pages 257–279. Elsevier, April 2018.
[ bib |
DOI ]
We describe categorical models of a circuit-based (quantum) functional programming language. We show that enriched categories play a crucial role. Following earlier work on QWire by Paykin et al., we consider both a simple first-order linear language for circuits, and a more powerful host language, such that the circuit language is embedded inside the host language. Our categorical semantics for the host language is standard, and involves cartesian closed categories and monads. We interpret the circuit language not in an ordinary category, but in a category that is enriched in the host category. As an extended example, we recall an earlier result that the category of W*-algebras is dcpo-enriched, and we use this model to extend the circuit language with some recursive types. Keywords: enriched categories, categorical semantics, linear type theory, quantum circuits, relative monad, quantum domain theory |
[130] |
Mathys Rennela and Sam Staton.
Classical Control, Quantum Circuits and Linear Logic in
Enriched Category Theory.
Logical Methods in Computer Science, 16(1):30, March 2020.
[ bib |
DOI ]
We describe categorical models of a circuit-based (quantum) functional programming language. We show that enriched categories play a crucial role. Following earlier work on QWire by Paykin et al., we consider both a simple first-order linear language for circuits, and a more powerful host language, such that the circuit language is embedded inside the host language. Our categorical semantics for the host language is standard, and involves cartesian closed categories and monads. We interpret the circuit language not in an ordinary category, but in a category that is enriched in the host category. We show that this structure is also related to linear/non-linear models. As an extended example, we recall an earlier result that the category of W*-algebras is dcpo-enriched, and we use this model to extend the circuit language with some recursive types. Keywords: programming languages, category theory, operator algebras |
[131] |
Francisco Rios.
On a Categorically Sound Quantum Programming Language for
Circuit Description.
PhD thesis, Dalhousie University, Halifax, Nova Scotia, Canada,
August 2021.
[ bib |
https ]
This thesis contains contributions to the mathematical foundations of quantum programming languages. Keywords: quantum programming languages, categorical model, quantum circuits, proto-quipper-m, category theory, quantum computing, quipper |
[132] |
Francisco Rios and Peter Selinger.
A Categorical Model for a Quantum Circuit Description Language
(Extended Abstract).
In Bob Coecke and Aleks Kissinger, editors, Proceedings of the
14th International Conference on Quantum Physics and Logic (QPL), Nijmegen,
the Netherlands, July 3–7, 2017, volume 266 of Electronic Proceedings
in Theoretical Computer Science, pages 164–178, Waterloo, NSW, Australia,
February 2018. Open Publishing Association.
[ bib |
DOI ]
Quipper is a practical programming language for describing families of quantum circuits. In this paper, we formalize a small, but useful fragment of Quipper called Proto-Quipper-M. Unlike its parent Quipper, this language is type-safe and has a formal denotational and operational semantics. Proto-Quipper-M is also more general than Quipper, in that it can describe families of morphisms in any symmetric monoidal category, of which quantum circuits are but one example. We design Proto-Quipper-M from the ground up, by first giving a general categorical model of parameters and state. The distinction between parameters and state is also known from hardware description languages. A parameter is a value that is known at circuit generation time, whereas a state is a value that is known at circuit execution time. After finding some interesting categorical structures in the model, we then define the programming language to fit the model. We cement the connection between the language and the model by proving type safety, soundness, and adequacy properties. Keywords: proto-quipper-m, quipper |
[133] |
Neil J. Ross.
Algebraic and Logical Methods in Quantum Computation.
PhD thesis, Dalhousie University, Halifax, Nova Scotia, Canada,
August 2015.
[ bib |
arXiv ]
This thesis contains contributions to the theory of quantum computation. We first define a new method to efficiently approximate special unitary operators. Specifically, given a special unitary U and a precision ε > 0, we show how to efficiently find a sequence of Clifford+V or Clifford+T operators whose product approximates U up to ε in the operator norm. In the general case, the length of the approximating sequence is asymptotically optimal. If the unitary to approximate is diagonal then our method is optimal: it yields the shortest sequence approximating U up to ε. Next, we introduce a mathematical formalization of a fragment of the Quipper quantum programming language. We define a typed lambda calculus called Proto-Quipper which formalizes a restricted but expressive fragment of Quipper. The type system of Proto-Quipper is based on intuitionistic linear logic and prohibits the duplication of quantum data, in accordance with the no-cloning property of quantum computation. We prove that Proto-Quipper is type-safe in the sense that it enjoys the subject reduction and progress properties. Keywords: proto-quipper-s, proto-quipper, quipper |
[134] |
Roland Rüdiger.
Quantum Programming Languages: An Introductory
Overview.
The Computer Journal, 50(2):134–150, March 2007.
[ bib |
DOI ]
The present article gives an introductory overview of the novel field of quantum programming languages (QPLs) from a pragmatic perspective. First, after a short summary of basic notations of quantum mechanics, some of the goals and design issues are surveyed, which motivate the research in this area. Then, several of the approaches are described in more detail. The article concludes with a brief survey of current research activities and a tabular summary of a selection of QPLs, which have been published so far. |
[135] |
Amr Sabry, Benoît Valiron, and Juliana Kaizer Vizzotto.
From Symmetric Pattern-Matching to Quantum Control.
In Christel Baier and Ugo Dal Lago, editors, Foundations of
Software Science and Computation Structures, FoSSaCS 2018, volume 10803 of
Lecture Notes in Computer Science, pages 348–364, Cham, April 2018.
Springer International Publishing.
[ bib |
DOI |
arXiv ]
One perspective on quantum algorithms is that they are classical algorithms having access to a special kind of memory with exotic properties. This perspective suggests that, even in the case of quantum algorithms, the control flow notions of sequencing, conditionals, loops, and recursion are entirely classical. There is however, another notion of control flow, that is itself quantum. The notion of quantum conditional expression is reasonably well-understood: the execution of the two expressions becomes itself a superposition of executions. The quantum counterpart of loops and recursion is however not believed to be meaningful in its most general form. |
[136] |
Peter Selinger.
A Brief Survey of Quantum Programming Languages.
In Yukiyoshi Kameyama and Peter J. Stuckey, editors, Proceedings
of the 7th International Symposium on Functional and Logic Programming,
volume 2998 of Lecture Notes in Computer Science, pages 1–6, Berlin,
Heidelberg, April 2004. Springer.
[ bib |
DOI ]
This article is a brief and subjective survey of quantum programming language research. Keywords: quantum computation, quantum algorithm, linear logic, denotational semantics, lambda calculus |
[137] |
Peter Selinger.
Towards a Quantum Programming Language.
Mathematical Structures in Computer Science, 14(4):527–586,
August 2004.
[ bib |
DOI |
.pdf ]
We propose the design of a programming language for quantum computing. Traditionally, quantum algorithms are frequently expressed at the hardware level, for instance in terms of the quantum circuit model or quantum Turing machines. These approaches do not encourage structured programming or abstractions such as data types. In this paper, we describe the syntax and semantics of a simple quantum programming language with high-level features such as loops, recursive procedures, and structured data types. The language is functional in nature, statically typed, free of run-time errors, and has an interesting denotational semantics in terms of complete partial orders of superoperators. |
[138] |
Peter Selinger.
Dagger Compact Closed Categories and Completely Positive Maps
(Extended Abstract).
Electronic Notes in Theoretical Computer Science, 170:139–163,
March 2007.
Proceedings of the 3rd International Workshop on Quantum Programming
Languages (QPL 2005).
[ bib |
DOI |
.pdf ]
Dagger compact closed categories were recently introduced by Abramsky and Coecke, under the name “strongly compact closed categories”, as an axiomatic framework for quantum mechanics. We present a graphical language for dagger compact closed categories, and sketch a proof of its completeness for equational reasoning. We give a general construction, the CPM construction, which associates to each dagger compact closed category its “category of completely positive maps”, and we show that the resulting category is again dagger compact closed. We apply these ideas to Abramsky and Coecke's interpretation of quantum protocols, and to D'Hondt and Panangaden's predicate transformer semantics. Keywords: categorical model, quantum computing, dagger categories, cpm construction |
[139] |
Peter Selinger and Benoît Valiron.
A Lambda Calculus for Quantum Computation with Classical
Control.
Mathematical Structures in Computer Science, 16(3):527–552,
June 2006.
[ bib |
DOI |
.pdf ]
In this paper we develop a functional programming language for quantum computers by extending the simply-typed lambda calculus with quantum types and operations. The design of this language adheres to the 'quantum data, classical control' paradigm, following the first author's work on quantum flow-charts. We define a call-by-value operational semantics, and give a type system using affine intuitionistic linear logic. The main results of this paper are the safety properties of the language and the development of a type inference algorithm. |
[140] |
Peter Selinger and Benoît Valiron.
Quantum Lambda Calculus.
In Gay and Mackie [55], pages 135–172.
[ bib |
DOI |
.pdf ]
We discuss the design of a typed lambda calculus for quantum computation. After a brief discussion of the role of higher-order functions in quantum information theory, we define the quantum lambda calculus and its operational semantics. Safety invariants, such as the no-cloning property, are enforced by a static type system that is based on intuitionistic linear logic. We also describe a type inference algorithm, and a categorical semantics. |
[141] |
Kartik Singhal.
Quantum Hoare Type Theory.
Master's thesis, University of Chicago, Chicago, IL, December 2020.
[ bib |
arXiv |
https ]
As quantum computers become real, it is high time we come up with effective techniques that help programmers write correct quantum programs. Inspired by Hoare Type Theory in classical computing, we propose Quantum Hoare Type Theory (QHTT), in which precise specifications about the modification to the quantum state can be provided within the type of computation. These specifications within a Hoare type are given in the form of Hoare-logic style pre- and postconditions following the propositions-as-types principle. The type-checking process verifies that the implementation conforms to the provided specification. QHTT has the potential to be a unified system for programming, specifying, and reasoning about quantum programs. Keywords: formal verification, program proof, programming languages, quantum computing, quantum computation, type systems, type theory, pre- and postconditions, program specifications, hoare logic, separation logic |
[142] |
Kartik Singhal, Kesha Hietala, Sarah Marshall, and Robert Rand.
Q# as a Quantum Algorithmic Language.
In Stefano Gogioso and Matty Hoban, editors, Proceedings 19th
International Conference on Quantum Physics and Logic, Wolfson College,
Oxford, UK, 27 June–1 July 2022, volume 394 of Electronic Proceedings
in Theoretical Computer Science, pages 170–191, Waterloo, NSW, Australia,
November 2023. Open Publishing Association.
[ bib |
DOI |
https ]
Q# is a standalone domain-specific programming language from Microsoft for writing and running quantum programs. Like most industrial languages, it was designed without a formal specification, which can naturally lead to ambiguity in its interpretation. We aim to provide a formal language definition for Q#, placing the language on a solid mathematical foundation and enabling further evolution of its design and type system. This paper presents λ-Q#, an idealized version of Q# that illustrates how we may view Q# as a quantum Algol (algorithmic language). We show the safety properties enforced by λ-Q#'s type system and present its equational semantics based on a fully complete algebraic theory by Staton. Keywords: quantum computing, quantum computation, programming languages, formal specification, formal language definitions, type systems, semantics and reasoning, quantum programming languages, language design, q# |
[143] |
Kartik Singhal, Sarah Marshall, Kesha Hietala, and Robert Rand.
Toward a Type-Theoretic Interpretation of Q# and Statically
Enforcing the No-Cloning Theorem.
In Second International Workshop on Programming Languages for
Quantum Computing (PLanQC '21), June 2021.
[ bib |
https ]
Q# is a high-level programming language from Microsoft for writing and running quantum programs. Like most industrial languages, it was designed without a formal specification, which can naturally lead to ambiguity in its interpretation. Further, currently, the Q# type system cannot statically prevent cloning of qubits. We aim to provide a formal specification and semantics for Q#, placing the language on a solid mathematical foundation, enabling further evolution of its design and type system (including enforcing no-cloning). This paper describes our current progress in designing λ-Q# (an idealized version of Q#), our solution to the qubit cloning problem in λ-Q#, and outlines the next steps. Keywords: quantum computing, quantum computation, programming languages, formal specification, formal language definitions, type systems, semantics and reasoning, quantum programming languages, language design, q# |
[144] |
Kartik Singhal, Robert Rand, and Michael Hicks.
Verified translation between low-level quantum languages.
In First International Workshop on Programming Languages for
Quantum Computing (PLanQC '20), January 2020.
[ bib |
https ]
We describe the ongoing development of a verified translator between OpenQASM (Open Quantum Assembly Language) and sqir, a Small Quantum Intermediate Representation used for circuit optimization. Verified translation from and to OpenQASM will allow verified optimization of circuits written in a variety of tools and executed on real quantum computers. This translator is a step toward a verified compilation stack for quantum computing. Keywords: formal verification, nisq, program proof, programming languages, semantic preservation, openqasm, qasm, quantum computing |
[145] |
Kartik Singhal and John Reppy.
Quantum Hoare Type Theory: Extended Abstract.
In Benoît Valiron, Shane Mansfield, Pablo Arrighi, and Prakash
Panangaden, editors, Proceedings of the 17th International Conference on
Quantum Physics and Logic (QPL), Paris, France, June 2–6, 2020, volume 340
of Electronic Proceedings in Theoretical Computer Science, pages
291–302, Waterloo, NSW, Australia, September 2021. Open Publishing
Association.
[ bib |
DOI |
https ]
As quantum computers become real, it is high time we come up with effective techniques that help programmers write correct quantum programs. In classical computing, formal verification and sound static type systems prevent several classes of bugs from being introduced. There is a need for similar techniques in the quantum regime. Inspired by Hoare Type Theory in the classical paradigm, we propose Quantum Hoare Types by extending the Quantum IO Monad by indexing it with pre- and post-conditions that serve as program specifications. In this paper, we introduce Quantum Hoare Type Theory (QHTT), present its syntax and typing rules, and demonstrate its effectiveness with the help of examples. QHTT has the potential to be a unified system for programming, specifying, and reasoning about quantum programs. This is a work in progress. Keywords: formal verification, program proof, programming languages, quantum computing, type systems, type theory, pre- and postconditions, program specifications, hoare logic, separation logic |
[146] |
Seyon Sivarajah, Silas Dilkes, Alexander Cowtan, Will Simmons, Alec Edgington,
and Ross Duncan.
t|ket⟩: a retargetable compiler for NISQ devices.
Quantum Science and Technology, 6(1):014003, November 2020.
[ bib |
DOI |
arXiv |
https ]
We present t|ket⟩, a quantum software development platform produced by Cambridge Quantum Computing Ltd. The heart of t|ket⟩ is a language-agnostic optimising compiler designed to generate code for a variety of NISQ devices, which has several features designed to minimise the influence of device error. The compiler has been extensively benchmarked and outperforms most competitors in terms of circuit optimisation and qubit routing. Keywords: tket |
[147] |
Robert S. Smith, Michael J. Curtis, and William J. Zeng.
A Practical Quantum Instruction Set Architecture, August
2016.
[ bib |
arXiv |
https ]
We introduce an abstract machine architecture for classical/quantum computations—including compilation—along with a quantum instruction language called Quil for explicitly writing these computations. With this formalism, we discuss concrete implementations of the machine and non-trivial algorithms targeting them. The introduction of this machine dovetails with ongoing development of quantum computing technology, and makes possible portable descriptions of recent classical/quantum algorithms. |
[148] |
Robert S. Smith, Eric C. Peterson, Mark G. Skilbeck, and Erik J. Davis.
An Open-Source, Industrial-Strength Optimizing Compiler for
Quantum Programs.
Quantum Science and Technology, 5(4):044001, July 2020.
[ bib |
DOI |
https ]
Quilc is an open-source, optimizing compiler for gate-based quantum programs written in Quil or QASM, two popular quantum programming languages. The compiler was designed with attention toward NISQ-era quantum computers, specifically recognizing that each quantum gate has a non-negligible and often irrecoverable cost toward a program's successful execution. Quilc's primary goal is to make authoring quantum software a simpler exercise by making architectural details less burdensome to the author. Using Quilc allows one to write programs faster while usually not compromising—and indeed sometimes improving—their execution fidelity on a given hardware architecture. In this paper, we describe many of the principles behind Quilc's design, and demonstrate the compiler with various examples. |
[149] |
Sam Staton.
Algebraic Effects, Linearity, and Quantum Programming
Languages.
In Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium
on Principles of Programming Languages, POPL '15, pages 395–406, New York,
NY, USA, January 2015. Association for Computing Machinery.
[ bib |
DOI |
.pdf ]
We develop a new framework of algebraic theories with linear parameters, and use it to analyze the equational reasoning principles of quantum computing and quantum programming languages. We use the framework as follows: we present a new elementary algebraic theory of quantum computation, built from unitary gates and measurement; we provide a completeness theorem for the elementary algebraic theory by relating it with a model from operator algebra; we extract an equational theory for a quantum programming language from the algebraic theory; we compare quantum computation with other local notions of computation by investigating variations on the algebraic theory. Keywords: monads, quantum computation, algebraic effects |
[150] |
Damian S. Steiger, Thomas Häner, and Matthias Troyer.
ProjectQ: An Open Source Software Framework for Quantum
Computing.
Quantum, 2:49, January 2018.
[ bib |
DOI ]
We introduce ProjectQ, an open source software effort for quantum computing. The first release features a compiler framework capable of targeting various types of hardware, a high-performance simulator with emulation capabilities, and compiler plug-ins for circuit drawing and resource estimation. We introduce our Python-embedded domain-specific language, present the features, and provide example implementations for quantum algorithms. The framework allows testing of quantum algorithms through simulation and enables running them on actual quantum hardware using a back-end connecting to the IBM Quantum Experience cloud service. Through extension mechanisms, users can provide back-ends to further quantum hardware, and scientists working on quantum compilation can provide plug-ins for additional compilation, optimization, gate synthesis, and layout strategies. |
[151] |
Krysta M. Svore, Alfred V. Aho, Andrew W. Cross, Isaac L. Chuang, and Igor L.
Markov.
A Layered Software Architecture for Quantum Computing Design
Tools.
Computer, 39(1):74–83, January 2006.
[ bib |
DOI |
.pdf ]
Compilers and computer-aided design tools are essential for fine-grained control of nanoscale quantum-mechanical systems. A proposed four-phase design flow assists with computations by transforming a quantum algorithm from a high-level language program into precisely scheduled physical actions. Keywords: quantum computing, design tools, programming languages, software architectures, epr pair creation |
[152] |
Krysta M. Svore, Andrew W. Cross, Alfred V. Aho, Isaac L. Chuang, and Igor L.
Markov.
Toward a Software Architecture for Quantum Computing Design
Tools.
In Proceedings of the 2nd International Workshop on Quantum
Programming Languages (QPL), Turku, Finland, July 12–13, 2004, pages
145–162, July 2004.
[ bib |
.pdf ]
Compilers and computer-aided design tools will be essential for quantum computing. We present a computer-aided design flow that transforms a high-level language program representing a quantum computing algorithm into a technology-specific implementation. We trace the significant steps in this flow and illustrate the transformations to the representation of the quantum program. The focus of this paper is on the languages and transformations needed to represent and optimize a quantum algorithm along the design flow. Our software architecture provides significant benefits to algorithm designers, tool builders, and experimentalists. Of particular interest are the trade-offs in performance and accuracy that can be obtained by weighing different optimization and error-correction procedures at given levels in the design hierarchy. |
[153] |
Krysta M. Svore, Alan Geller, Matthias Troyer, John Azariah, Christopher E.
Granade, Bettina Heim, Vadym Kliuchnikov, Mariia Mykhailova, Andres Paz, and
Martin Roetteler.
Q#: Enabling Scalable Quantum Computing and Development
with a High-Level DSL.
In Proceedings of the Real World Domain Specific Languages
Workshop 2018, RWDSL '18, page 7, New York, NY, USA, February 2018.
Association for Computing Machinery.
[ bib |
DOI |
arXiv ]
Quantum computing exploits quantum phenomena such as superposition and entanglement to realize a form of parallelism that is not available to traditional computing. It offers the potential of significant computational speed-ups in quantum chemistry, materials science, cryptography, and machine learning. The dominant approach to programming quantum computers is to provide an existing high-level language with libraries that allow for the expression of quantum programs. This approach can permit computations that are meaningless in a quantum context; prohibits succinct expression of interaction between classical and quantum logic; and does not provide important constructs that are required for quantum programming. We present Q#, a quantum-focused domain-specific language explicitly designed to correctly, clearly and completely express quantum algorithms. Q# provides a type system; a tightly constrained environment to safely interleave classical and quantum computations; specialized syntax; symbolic code manipulation to automatically generate correct transformations of quantum operations; and powerful functional constructs which aid composition. Keywords: domain specific language, functional programming, quantum computing, q# |
[154] |
Runzhou Tao, Yunong Shi, Jianan Yao, John Hui, Frederic T. Chong, and Ronghui
Gu.
Gleipnir: Toward Practical Error Analysis for Quantum Programs.
In Proceedings of the 42nd ACM SIGPLAN International Conference
on Programming Language Design and Implementation, PLDI 2021, pages 48–64,
New York, NY, USA, June 2021. Association for Computing Machinery.
[ bib |
DOI ]
Practical error analysis is essential for the design, optimization, and evaluation of Noisy Intermediate-Scale Quantum(NISQ) computing. However, bounding errors in quantum programs is a grand challenge, because the effects of quantum errors depend on exponentially large quantum states. In this work, we present Gleipnir, a novel methodology toward practically computing verified error bounds in quantum programs. Gleipnir introduces the (ρ,δ)-diamond norm, an error metric constrained by a quantum predicate consisting of the approximate state ρ and its distance δ to the ideal state ρ. This predicate (ρ,δ) can be computed adaptively using tensor networks based on the Matrix Product States. Gleipnir features a lightweight logic for reasoning about error bounds in noisy quantum programs, based on the (ρ,δ)-diamond norm metric. Our experimental results show that Gleipnir is able to efficiently generate tight error bounds for real-world quantum programs with 10 to 100 qubits, and can be used to evaluate the error mitigation performance of quantum compiler transformations. Keywords: quantum programming, error analysis, approximate computing |
[155] |
Runzhou Tao, Yunong Shi, Jianan Yao, Xupeng Li, Ali Javadi-Abhari, Andrew W.
Cross, Frederic T. Chong, and Ronghui Gu.
Giallar: Push-Button Verification for the Qiskit Quantum
Compiler.
In Proceedings of the 43rd ACM SIGPLAN International Conference
on Programming Language Design and Implementation, PLDI '22, pages
641–656, New York, NY, USA, June 2022. Association for Computing
Machinery.
[ bib |
DOI |
arXiv ]
This paper presents Giallar, a fully-automated verification toolkit for quantum compilers. Giallar requires no manual specifications, invariants, or proofs, and can automatically verify that a compiler pass preserves the semantics of quantum circuits. To deal with unbounded loops in quantum compilers, Giallar abstracts three loop templates, whose loop invariants can be automatically inferred. To efficiently check the equivalence of arbitrary input and output circuits that have complicated matrix semantics representation, Giallar introduces a symbolic representation for quantum circuits and a set of rewriting rules for reducing symbolic quantum circuits. With Giallar, we implemented and verified 44 (out of 56) compiler passes in 13 versions of the Qiskit compiler, the open-source quantum compiler standard, during which three bugs were detected in and confirmed by Qiskit. Our evaluation shows that most of Qiskit compiler passes can be automatically verified in seconds and verification imposes only a modest overhead to compilation performance. Keywords: quantum computing, compiler verification, automated verification |
[156] |
Dominique Unruh.
Quantum Hoare Logic with Ghost Variables.
In Proceedings of the 34th Annual ACM/IEEE Symposium on Logic in
Computer Science, LICS '19, page 47, Los Alamitos, CA, USA, June 2019.
IEEE Computer Society.
[ bib |
DOI |
arXiv ]
Quantum Hoare logic allows us to reason about quantum programs. We present an extension of quantum Hoare logic that introduces “ghost variables” to extend the expressive power of pre-/postconditions. Ghost variables are variables that do not actually occur in the program and are allowed to have arbitrary quantum states (in a sense, they are existentially quantified), and be entangled with program variables. Ghost variables allow us to express properties such as the distribution of a program variable or the fact that a variable has classical content. And as a case study, we show how quantum Hoare logic with ghost variables can be used to prove the security of the quantum one-time pad. Keywords: quantum entanglement, quantum computing, probabilistic logic, cryptography, semantics, hoare logic |
[157] |
Dominique Unruh.
Quantum Relational Hoare Logic.
Proceedings of the ACM on Programming Languages, 3(POPL):33,
January 2019.
[ bib |
DOI |
arXiv ]
We present a logic for reasoning about pairs of interactive quantum programs – quantum relational Hoare logic (qRHL). This logic follows the spirit of probabilistic relational Hoare logic (Barthe et al. 2009) and allows us to formulate how the outputs of two quantum programs relate given the relationship of their inputs. Probabilistic RHL was used extensively for computer-verified security proofs of classical cryptographic protocols. Since pRHL is not suitable for analyzing quantum cryptography, we present qRHL as a replacement, suitable for the security analysis of post-quantum cryptography and quantum protocols. The design of qRHL poses some challenges unique to the quantum setting, e.g., the definition of equality on quantum registers. Finally, we implemented a tool for verifying proofs in qRHL and developed several example security proofs in it. Keywords: formal verification, quantum cryptography, hoare logic |
[158] |
Dominique Unruh.
Quantum and classical registers, November 2021.
[ bib |
arXiv ]
We present a generic theory of “registers” in imperative programs and instantiate it in the classical and quantum setting. Roughly speaking, a register is some mutable part of the program state. Mutable classical variables and quantum registers and wires in quantum circuits are examples of this. However, registers in our setting can also refer to subparts of other registers, or combinations of parts from different registers, or quantum registers seen in a different basis, etc. Our formalization is intended to be well suited for formalization in theorem provers and as a foundation for modeling quantum/classical variables in imperative programs. We study the quantum registers in greater detail and cover the infinite-dimensional case as well. We implemented a large part of our results (including a minimal quantum Hoare logic and an analysis of quantum teleportation) in the Isabelle/HOL theorem prover. |
[159] |
Dominique Unruh.
Quantum and Classical Registers.
Archive of Formal Proofs, 2021, October 2021.
[ bib |
.html ]
A formalization of the theory of quantum and classical registers as developed by (Unruh, Quantum and Classical Registers). In a nutshell, a register refers to a part of a larger memory or system that can be accessed independently. Registers can be constructed from other registers and several (compatible) registers can be composed. This formalization develops both the generic theory of registers as well as specific instantiations for classical and quantum registers. |
[160] |
Benoît Valiron, Neil J. Ross, Peter Selinger, D. Scott Alexander, and
Jonathan M. Smith.
Programming the Quantum Future.
Communications of the ACM, 58(8):52–61, July 2015.
[ bib |
DOI ]
The Quipper language offers a unified general-purpose programming framework for quantum computation. Keywords: quipper |
[161] |
John van de Wetering.
ZX-calculus for the working quantum computer scientist,
December 2020.
[ bib |
arXiv ]
The ZX-calculus is a graphical language for reasoning about quantum computation that has recently seen an increased usage in a variety of areas such as quantum circuit optimisation, surface codes and lattice surgery, measurement-based quantum computation, and quantum foundations. The first half of this review gives a gentle introduction to the ZX-calculus suitable for those familiar with the basics of quantum computing. The aim here is to make the reader comfortable enough with the ZX-calculus that they could use it in their daily work for small computations on quantum circuits and states. The latter sections give a condensed overview of the literature on the ZX-calculus. We discuss Clifford computation and graphically prove the Gottesman-Knill theorem, we discuss a recently introduced extension of the ZX-calculus that allows for convenient reasoning about Toffoli gates, and we discuss the recent completeness theorems for the ZX-calculus that show that, in principle, all reasoning about quantum computation can be done using ZX-diagrams. Additionally, we discuss the categorical and algebraic origins of the ZX-calculus and we discuss several extensions of the language which can represent mixed states, measurement, classical control and higher-dimensional qudits. Keywords: zx-calculus, category theory |
[162] |
Juliana Kaizer Vizzotto, Thorsten Altenkirch, and Amr Sabry.
Structuring quantum effects: superoperators as arrows.
Mathematical Structures in Computer Science, 16(3):453–468,
July 2006.
[ bib |
DOI |
arXiv ]
We show that the model of quantum computation based on density matrices and superoperators can be decomposed into a pure classical (functional) part and an effectful part modelling probabilities and measurement. The effectful part can be modelled using a generalisation of monads called arrows. We express the resulting executable model of quantum computing in the Haskell programming language using its special syntax for arrow computations. However, the embedding in Haskell is not perfect: a faithful model of quantum computing requires type capabilities that are not directly expressible in Haskell. Keywords: arrows |
[163] |
Juliana Kaizer Vizzotto, André Rauber Du Bois, and Amr Sabry.
The Arrow Calculus as a Quantum Programming Language.
In Hiroakira Ono, Makoto Kanazawa, and Ruy de Queiroz, editors,
Logic, Language, Information and Computation, pages 379–393, Berlin,
Heidelberg, June 2009. Springer.
[ bib |
DOI ]
We express quantum computations (with measurements) using the arrow calculus extended with monadic constructions. This framework expresses quantum programming using well-understood and familiar classical patterns for programming in the presence of computational effects. In addition, the five laws of the arrow calculus provide a convenient framework for equational reasoning about quantum computations that include measurements. Keywords: density matrix, quantum computation, quantum algorithm, functional programming, lambda calculus, arrows |
[164] |
Juliana Kaizer Vizzotto, Giovani Rubert Librelotto, and Amr Sabry.
Reasoning about General Quantum Programs over Mixed States.
In Marcel Vinícius Medeiros Oliveira and Jim Woodcock, editors,
Formal Methods: Foundations and Applications: 12th Brazilian Symposium
on Formal Methods, SBMF 2009 Gramado, Brazil, August 19-21, 2009 Revised
Selected Papers, pages 321–335, Berlin, Heidelberg, November 2009.
Springer.
[ bib |
DOI ]
In this work we present a functional programming language for quantum computation over mixed states. More interestingly, we develop a set of equations for the resulting programming language, proposing the first framework for equational reasoning about quantum computations over mixed states. Keywords: density matrix, quantum computation, quantum algorithm, quantum circuits, quantum operation |
[165] |
Finn Voichick, Liyi Li, Robert Rand, and Michael Hicks.
Qunity: A Unified Language for Quantum and Classical Computing.
Proceedings of the ACM on Programming Languages, 7(POPL):32,
January 2023.
[ bib |
DOI |
arXiv |
https ]
We introduce Qunity, a new quantum programming language designed to treat quantum computing as a natural generalization of classical computing. Qunity presents a unified syntax where familiar programming constructs can have both quantum and classical effects. For example, one can use sum types to implement the direct sum of linear operators, exception handling syntax to implement projective measurements, and aliasing to induce entanglement. Further, Qunity takes advantage of the overlooked BQP subroutine theorem, allowing one to construct reversible subroutines from irreversible quantum algorithms through the uncomputation of "garbage" outputs. Unlike existing languages that enable quantum aspects with separate add-ons (like a classical language with quantum gates bolted on), Qunity provides a unified syntax along with a novel denotational semantics that guarantees that programs are quantum mechanically valid. We present Qunity's syntax, type system, and denotational semantics, showing how it can cleanly express several quantum algorithms. We also detail how Qunity can be compiled to a low-level qubit circuit language like OpenQASM, proving the realizability of our design. Keywords: algebraic data types, reversible computing, quantum subroutines, kraus operators |
[166] |
Dave Wecker and Krysta M. Svore.
LIQUi|⟩: A Software Design Architecture and
Domain-Specific Language for Quantum Computing, February 2014.
[ bib |
arXiv ]
Languages, compilers, and computer-aided design tools will be essential for scalable quantum computing, which promises an exponential leap in our ability to execute complex tasks. LIQUi|⟩ is a modular software architecture designed to control quantum hardware. It enables easy programming, compilation, and simulation of quantum algorithms and circuits, and is independent of a specific quantum architecture. LIQUi|⟩ contains an embedded, domain-specific language designed for programming quantum algorithms, with F# as the host language. It also allows the extraction of a circuit data structure that can be used for optimization, rendering, or translation. The circuit can also be exported to external hardware and software environments. Two different simulation environments are available to the user which allow a trade-off between number of qubits and class of operations. LIQUi|⟩ has been implemented on a wide range of runtimes as back-ends with a single user front-end. We describe the significant components of the design architecture and how to express any given quantum algorithm. |
[167] |
Amanda Xu, Abtin Molavi, Lauren Pick, Swamit Tannu, and Aws Albarghouthi.
Synthesizing Quantum-Circuit Optimizers.
Proceedings of the ACM on Programming Languages, 7(PLDI):140,
June 2023.
[ bib |
DOI ]
Near-term quantum computers are expected to work in an environment where each operation is noisy, with no error correction. Therefore, quantum-circuit optimizers are applied to minimize the number of noisy operations. Today, physicists are constantly experimenting with novel devices and architectures. For every new physical substrate and for every modification of a quantum computer, we need to modify or rewrite major pieces of the optimizer to run successful experiments. In this paper, we present QUESO, an efficient approach for automatically synthesizing a quantum-circuit optimizer for a given quantum device. For instance, in 1.2 minutes, QUESO can synthesize an optimizer with high-probability correctness guarantees for IBM computers that significantly outperforms leading compilers, such as IBM's Qiskit and TKET, on the majority (85%) of the circuits in a diverse benchmark suite.A number of theoretical and algorithmic insights underlie QUESO: (1) An algebraic approach for representing rewrite rules and their semantics. This facilitates reasoning about complex symbolic rewrite rules that are beyond the scope of existing techniques. (2) A fast approach for probabilistically verifying equivalence of quantum circuits by reducing the problem to a special form of polynomial identity testing. (3) A novel probabilistic data structure, called a polynomial identity filter (PIF), for efficiently synthesizing rewrite rules. (4) A beam-search-based algorithm that efficiently applies the synthesized symbolic rewrite rules to optimize quantum circuits. Keywords: probabilistic verification, quantum computing |
[168] |
Mingkuan Xu, Zikun Li, Oded Padon, Sina Lin, Jessica Pointing, Auguste Hirth,
Henry Ma, Jens Palsberg, Alex Aiken, Umut A. Acar, and Zhihao Jia.
Quartz: Superoptimization of Quantum Circuits.
In Proceedings of the 43rd ACM SIGPLAN International Conference
on Programming Language Design and Implementation, PLDI '22, pages
625–640, New York, NY, USA, June 2022. Association for Computing
Machinery.
[ bib |
DOI |
arXiv |
https ]
Existing quantum compilers optimize quantum circuits by applying circuit transformations designed by experts. This approach requires significant manual effort to design and implement circuit transformations for different quantum devices, which use different gate sets, and can miss subtle optimizations that are hard to find manually. Keywords: quantum computing, superoptimization |
[169] |
Peng Yan, Hanru Jiang, and Nengkun Yu.
On Incorrectness Logic for Quantum Programs.
Proceedings of the ACM on Programming Languages, 6(OOPSLA1):72,
April 2022.
[ bib |
DOI |
https ]
Bug-catching is important for developing quantum programs. Motivated by the incorrectness logic for classical programs, we propose an incorrectness logic towards a logical foundation for static bug-catching in quantum programming. The validity of formulas in this logic is dual to that of quantum Hoare logics. We justify the formulation of validity by an intuitive explanation from a reachability point of view and a comparison against several alternative formulations. Compared with existing works focusing on dynamic analysis, our logic provides sound and complete arguments. We further demonstrate the usefulness of the logic by reasoning several examples, including Grover's search, quantum teleportation, and a repeat-until-success program. We also automate the reasoning procedure by a prototyped static analyzer built on top of the logic rules. Keywords: quantum programming languages, projective quantum predicates, incorrectness logic |
[170] |
Mingsheng Ying.
Hoare Logic for Quantum Programs, June 2009.
[ bib |
arXiv ]
Hoare logic is a foundation of axiomatic semantics of classical programs and it provides effective proof techniques for reasoning about correctness of classical programs. To offer similar techniques for quantum program verification and to build a logical foundation of programming methodology for quantum computers, we develop a full-fledged Hoare logic for both partial and total correctness of quantum programs. It is proved that this logic is (relatively) complete by exploiting the power of weakest preconditions and weakest liberal preconditions for quantum programs. |
[171] |
Mingsheng Ying.
Floyd–Hoare Logic for Quantum Programs.
ACM Transactions on Programming Languages and Systems,
33(6):19, January 2012.
[ bib |
DOI ]
Floyd–Hoare logic is a foundation of axiomatic semantics of classical programs, and it provides effective proof techniques for reasoning about correctness of classical programs. To offer similar techniques for quantum program verification and to build a logical foundation of programming methodology for quantum computers, we develop a full-fledged Floyd–Hoare logic for both partial and total correctness of quantum programs. It is proved that this logic is (relatively) complete by exploiting the power of weakest preconditions and weakest liberal preconditions for quantum programs. Keywords: quantum computation, programming languages, axiomatic semantics, floyd–hoare logic, completeness, hoare logic |
[172] |
Mingsheng Ying.
Quantum Recursion and Second Quantisation, May 2014.
Talk at Tsinghua Software Day 2014.
[ bib |
arXiv ]
This paper introduces a new notion of quantum recursion of which the control flow of the computation is quantum rather than classical as in the notions of recursion considered in the previous studies of quantum programming. A typical example is recursive quantum walks, which are obtained by slightly modifying the construction of the ordinary quantum walks. The operational and denotational semantics of quantum recursions are defined by employing the second quantisation method, and they are proved to be equivalent. |
[173] |
Mingsheng Ying.
Foundations of Quantum Programming.
Morgan Kaufmann, Amsterdam, March 2016.
[ bib |
DOI ]
Foundations of Quantum Programming discusses how new programming methodologies and technologies developed for current computers can be extended to exploit the unique power of quantum computers, which promise dramatic advantages in processing speed over currently available computer systems. Governments and industries around the globe are now investing vast amounts of money with the expectation of building practical quantum computers. Drawing upon years of experience and research in quantum computing research and using numerous examples and illustrations, Mingsheng Ying has created a very useful reference on quantum programming languages and important tools and techniques required for quantum programming, making the book a valuable resource for academics, researchers, and developers. |
[174] |
Mingsheng Ying.
Birkhoff-von Neumann Quantum Logic as an Assertion Language for
Quantum Programs, May 2022.
[ bib |
arXiv ]
A first-order logic with quantum variables is needed as an assertion language for specifying and reasoning about various properties (e.g. correctness) of quantum programs. Surprisingly, such a logic is missing in the literature, and the existing first-order Birkhoff-von Neumann quantum logic deals with only classical variables and quantifications over them. In this paper, we fill in this gap by introducing a first-order extension of Birkhoff-von Neumann quantum logic with universal and existential quantifiers over quantum variables. Examples are presented to show our logic is particularly suitable for specifying some important properties studied in quantum computation and quantum information. We further incorporate this logic into quantum Hoare logic as an assertion logic so that it can play a role similar to that of first-order logic for classical Hoare logic and BI-logic for separation logic. In particular, we show how it can be used to define and derive quantum generalisations of some adaptation rules that have been applied to significantly simplify verification of classical programs. It is expected that the assertion logic defined in this paper - first-order quantum logic with quantum variables - can be combined with various quantum program logics to serve as a solid logical foundation upon which verification tools can be built using proof assistants such as Coq and Isabelle/HOL. |
[175] |
Mingsheng Ying, Runyao Duan, Yuan Feng, and Zhengfeng Ji.
Predicate Transformer Semantics of Quantum Programs.
In Gay and Mackie [55], pages 311–360.
[ bib |
DOI |
.pdf ]
This chapter presents a systematic exposition of predicate transformer semantics for quantum programs. It is divided into two parts: The first part reviews the state transformer (forward) semantics of quantum programs according to Selinger's suggestion of representing quantum programs by superoperators and elucidates D'Hondt-Panangaden's theory of quantum weakest preconditions in detail. In the second part, we develop a quite complete predicate transformer semantics of quantum programs based on Birkhoff-von Neumann quantum logic by considering only quantum predicates expressed by projection operators. In particular, the universal conjunctivity and termination law of quantum programs are proved, and Hoare's induction rule is established in the quantum setting. |
[176] |
Mingsheng Ying and Yuan Feng.
Model Checking Quantum Systems: Principles and Algorithms.
Cambridge University Press, Cambridge, January 2021.
[ bib |
DOI ]
Model checking is one of the most successful verification techniques and has been widely adopted in traditional computing and communication hardware and software industries. This book provides the first systematic introduction to model checking techniques applicable to quantum systems, with broad potential applications in the emerging industry of quantum computing and quantum communication as well as quantum physics. Suitable for use as a course textbook and for self-study, graduate and senior undergraduate students will appreciate the step-by-step explanations and the exercises included. Researchers and engineers in the related fields can further develop these techniques in their own work, with the final chapter outlining potential future applications. Keywords: model checking, quantum computing |
[177] |
Mingsheng Ying, Shenggang Ying, and Xiaodi Wu.
Invariants of Quantum Programs: Characterisations and
Generation.
In Proceedings of the 44th ACM SIGPLAN Symposium on Principles
of Programming Languages, POPL '17, pages 818–832, New York, NY, USA,
January 2017. Association for Computing Machinery.
[ bib |
DOI |
.pdf ]
Program invariant is a fundamental notion widely used in program verification and analysis. The aim of this paper is twofold: (i) find an appropriate definition of invariants for quantum programs; and (ii) develop an effective technique of invariant generation for verification and analysis of quantum programs. Interestingly, the notion of invariant can be defined for quantum programs in two different ways – additive invariants and multiplicative invariants – corresponding to two interpretations of implication in a continuous valued logic: the Lukasiewicz implication and the Godel implication. It is shown that both of them can be used to establish partial correctness of quantum programs. The problem of generating additive invariants of quantum programs is addressed by reducing it to an SDP (Semidefinite Programming) problem. This approach is applied with an SDP solver to generate invariants of two important quantum algorithms – quantum walk and quantum Metropolis sampling. Our examples show that the generated invariants can be used to verify correctness of these algorithms and are helpful in optimising quantum Metropolis sampling. To our knowledge, this paper is the first attempt to define the notion of invariant and to develop a method of invariant generation for quantum programs. Keywords: inductive assertions, quantum programming, partial correctness, invariant generation, program invariants |
[178] |
Mingsheng Ying, Nengkun Yu, and Yuan Feng.
Alternation in Quantum Programming: From Superposition
of Data to Superposition of Programs, February 2014.
[ bib |
arXiv ]
We extract a novel quantum programming paradigm - superposition of programs - from the design idea of a popular class of quantum algorithms, namely quantum walk-based algorithms. The generality of this paradigm is guaranteed by the universality of quantum walks as a computational model. A new quantum programming language QGCL is then proposed to support the paradigm of superposition of programs. This language can be seen as a quantum extension of Dijkstra's GCL (Guarded Command Language). Surprisingly, alternation in GCL splits into two different notions in the quantum setting: classical alternation (of quantum programs) and quantum alternation, with the latter being introduced in QGCL for the first time. Quantum alternation is the key program construct for realizing the paradigm of superposition of programs. The denotational semantics of QGCL are defined by introducing a new mathematical tool called the guarded composition of operator-valued functions. Then the weakest precondition semantics of QGCL can straightforwardly derived. Another very useful program construct in realizing the quantum programming paradigm of superposition of programs, called quantum choice, can be easily defined in terms of quantum alternation. The relation between quantum choices and probabilistic choices is clarified through defining the notion of local variables. We derive a family of algebraic laws for QGCL programs that can be used in program verification, transformations and compilation. The expressive power of QGCL is illustrated by several examples where various variants and generalizations of quantum walks are conveniently expressed using quantum alternation and quantum choice. We believe that quantum programming with quantum alternation and choice will play an important role in further exploiting the power of quantum computing. |
[179] |
Mingsheng Ying, Nengkun Yu, Yuan Feng, and Runyao Duan.
Verification of Quantum Programs.
Science of Computer Programming, 78(9):1679–1700, September
2013.
[ bib |
DOI ]
This paper develops verification methodology for quantum programs, and the contribution of the paper is two-fold. |
[180] |
Mingsheng Ying, Li Zhou, and Yangjia Li.
Reasoning about Parallel Quantum Programs, October 2018.
[ bib |
arXiv ]
We initiate the study of parallel quantum programming by defining the operational and denotational semantics of parallel quantum programs. The technical contributions of this paper include: (1) find a series of useful proof rules for reasoning about correctness of parallel quantum programs; (2) prove a (relative) completeness of our proof rules for partial correctness of disjoint parallel quantum programs; and (3) prove a strong soundness theorem of the proof rules showing that partial correctness is well maintained at each step of transitions in the operational semantics of a general parallel quantum program (with shared variables). This is achieved by partially overcoming the following conceptual challenges that are never present in classical parallel programming: (i) the intertwining of nondeterminism caused by quantum measurements and introduced by parallelism; (ii) entanglement between component quantum programs; and (iii) combining quantum predicates in the overlap of state Hilbert spaces of component quantum programs with shared variables. Applications of the techniques developed in this paper are illustrated by a formal verification of Bravyi-Gosset-König's parallel quantum algorithm solving a linear algebra problem, which gives for the first time an unconditional proof of a computational quantum advantage. |
[181] |
Mingsheng Ying, Li Zhou, Yangjia Li, and Yuan Feng.
A proof system for disjoint parallel quantum programs.
Theoretical Computer Science, 897:164–184, November 2021.
[ bib |
DOI ]
In this paper, we define the operational and denotational semantics of a special class of parallel quantum programs, namely disjoint parallel quantum programs. Based on them, a proof system for reasoning about disjoint parallel quantum programs is developed, which is (relatively) complete even when entanglement between different processes appears in the preconditions and postconditions. Keywords: quantum programming, quantum hoare logic, parallel programs, entanglement, hoare logic |
[182] |
Nengkun Yu and Jens Palsberg.
Quantum Abstract Interpretation.
In Proceedings of the 42nd ACM SIGPLAN International Conference
on Programming Language Design and Implementation, PLDI '21, pages
542–558, New York, NY, USA, June 2021. Association for Computing
Machinery.
[ bib |
DOI |
.pdf ]
In quantum computing, the basic unit of information is a qubit. Simulation of a general quantum program takes exponential time in the number of qubits, which makes simulation infeasible beyond 50 qubits on current supercomputers. So, for the understanding of larger programs, we turn to static techniques. In this paper, we present an abstract interpretation of quantum programs and we use it to automatically verify assertions in polynomial time. Our key insight is to let an abstract state be a tuple of projections. For such domains, we present abstraction and concretization functions that form a Galois connection and we use them to define abstract operations. Our experiments on a laptop have verified assertions about the Bernstein-Vazirani, GHZ, and Grover benchmarks with 300 qubits. Keywords: quantum programming, scalability, abstract interpretation |
[183] |
Charles Yuan and Michael Carbin.
Tower: Data Structures in Quantum Superposition.
Proceedings of the ACM on Programming Languages,
6(OOPSLA2):134, October 2022.
[ bib |
DOI |
arXiv |
https ]
Emerging quantum algorithms for problems such as element distinctness, subset sum, and closest pair demonstrate computational advantages by relying on abstract data structures. Practically realizing such an algorithm as a program for a quantum computer requires an efficient implementation of the data structure whose operations correspond to unitary operators that manipulate quantum superpositions of data. Keywords: quantum programming, data structures, quantum random-access memory, reversible programming, history independence |
[184] |
Charles Yuan, Christopher McNally, and Michael Carbin.
Twist: Sound Reasoning for Purity and Entanglement in Quantum
Programs.
Proceedings of the ACM on Programming Languages, 6(POPL):30,
January 2022.
[ bib |
DOI |
arXiv |
https ]
Quantum programming languages enable developers to implement algorithms for quantum computers that promise computational breakthroughs in classically intractable tasks. Programming quantum computers requires awareness of entanglement, the phenomenon in which measurement outcomes of qubits are correlated. Entanglement can determine the correctness of algorithms and suitability of programming patterns. In this work, we formalize purity as a central tool for automating reasoning about entanglement in quantum programs. A pure expression is one whose evaluation is unaffected by the measurement outcomes of qubits that it does not own, implying freedom from entanglement with any other expression in the computation. We present Twist, the first language that features a type system for sound reasoning about purity. The type system enables the developer to identify pure expressions using type annotations. Twist also features purity assertion operators that state the absence of entanglement in the output of quantum gates. To soundly check these assertions, Twist uses a combination of static analysis and runtime verification. We evaluate Twist's type system and analyses on a benchmark suite of quantum programs in simulation, demonstrating that Twist can express quantum algorithms, catch programming errors in them, and support programs that existing languages disallow, while incurring runtime verification overhead of less than 3.5%. Keywords: entanglement, purity, quantum programming, type systems |
[185] |
Jianjun Zhao.
Quantum Software Engineering: Landscapes and Horizons, July
2020.
[ bib |
arXiv ]
Quantum software plays a critical role in exploiting the full potential of quantum computing systems. As a result, it has been drawing increasing attention recently. This paper defines the term “quantum software engineering” and introduces a quantum software life cycle. The paper also gives a generic view of quantum software engineering and discusses the quantum software engineering processes, methods, and tools. Based on these, the paper provides a comprehensive survey of the current state of the art in the field and presents the challenges and opportunities we face. The survey summarizes the technology available in the various phases of the quantum software life cycle, including quantum software requirements analysis, design, implementation, test, and maintenance. It also covers the crucial issues of quantum software reuse and measurement. |
[186] |
Li Zhou, Gilles Barthe, Justin Hsu, Mingsheng Ying, and Nengkun Yu.
A Quantum Interpretation of Bunched Logic & Quantum Separation
Logic.
In Proceedings of the 36th Annual ACM/IEEE Symposium on Logic in
Computer Science, LICS '21, pages 1–14, Los Alamitos, CA, USA, July
2021. IEEE Computer Society.
[ bib |
DOI |
arXiv ]
We propose a model of the substructural logic of Bunched Implications (BI) that is suitable for reasoning about quantum states. In our model, the separating conjunction of BI describes separable quantum states. We develop a program logic where pre- and post-conditions are BI formulas describing quantum states—the program logic can be seen as a counterpart of separation logic for imperative quantum programs. We exercise the logic for proving the security of quantum one-time pad and secret sharing, and we show how the program logic can be used to discover a flaw in Google Cirq's tutorial on the Variational Quantum Algorithm (VQA). Keywords: formal logic, quantum computing, substructural logic, separating conjunction, separable quantum states, program logic, imperative quantum programs, variational quantum algorithm, quantum interpretation, bunched logic, separation logic |
[187] |
Li Zhou, Gilles Barthe, Pierre-Yves Strub, Junyi Liu, and Mingsheng Ying.
CoqQ: Foundational Verification of Quantum Programs.
Proceedings of the ACM on Programming Languages, 7(POPL):29,
January 2023.
[ bib |
DOI |
arXiv |
https ]
CoqQ is a framework for reasoning about quantum programs in the Coq proof assistant. Its main components are: a deeply embedded quantum programming language, in which classic quantum algorithms are easily expressed, and an expressive program logic for proving properties of programs. CoqQ is foundational: the program logic is formally proved sound with respect to a denotational semantics based on state-of-art mathematical libraries (mathcomp and mathcomp analysis). CoqQ is also practical: assertions can use Dirac expressions, which eases concise specifications, and proofs can exploit local and parallel reasoning, which minimizes verification effort. We illustrate the applicability of CoqQ with many examples from the literature. Keywords: quantum programs, program logics, proof assistants, mathematical libraries |
[188] |
Li Zhou, Nengkun Yu, and Mingsheng Ying.
An Applied Quantum Hoare Logic.
In Proceedings of the 40th ACM SIGPLAN Conference on Programming
Language Design and Implementation, PLDI '19, pages 1149–1162, New
York, NY, USA, June 2019. Association for Computing Machinery.
[ bib |
DOI |
.pdf ]
We derive a variant of quantum Hoare logic (QHL), called applied quantum Hoare logic (aQHL for short), by: 1. restricting QHL to a special class of preconditions and postconditions, namely projections, which can significantly simplify verification of quantum programs and are much more convenient when used in debugging and testing; and 2. adding several rules for reasoning about robustness of quantum programs, i.e. error bounds of outputs. The effectiveness of aQHL is shown by its applications to verify two sophisticated quantum algorithms: HHL (Harrow-Hassidim-Lloyd) for solving systems of linear equations and qPCA (quantum Principal Component Analysis). Keywords: quantum computation, hoare logic, robustness, projections, programming languages |
[189] |
Margherita Zorzi.
Quantum Calculi—From Theory to Language Design.
Applied Sciences, 9(24):5472, December 2019.
[ bib |
DOI ]
In the last 20 years, several approaches to quantum programming have been introduced. In this survey, we focus on the QRAM (Quantum Random Access Machine) architectural model. We explore the twofold perspective (theoretical and concrete) of the approach and we list the main problems one has to face in quantum language design. Moreover, we propose an overview of some interesting languages and open-source platforms for quantum programming currently available. We also provide the higher-order encoding in the functional languages qPCF and IQu of the well known Deutsch-Jozsa and Simon's algorithms. Keywords: quantum language design, quantum computing, programming theory |
This file was generated by bibtex2html 1.99.
Go home.