We present a framework for representing quantum entities in Haskell. States and operators are functional objects, and their semantics is defined --- as far as possible --- independently of the base in the Hilbert space. We construct effectively the tensor states for composed systems, and we present a toy model of quantum circuit toolbox. We conclude that functional languages are right tools for formal computations in quantum physics. The paper focuses mainly on the representation, not on computational problems.
We present a framework for representing quantum entities in Haskell. States and operators are functional objects, and their semantics is defined --- as far as possible --- independently of the base in the Hilbert space. We construct effectively the tensor states for composed systems, and we present a toy model of quantum circuit toolbox. We conclude that functional languages are right tools for formal computations in quantum physics. The paper focuses mainly on the representation, not on computational problems.
This thesis is a study of the construction and representation of typed models of quantum mechanics for use in quantum computation. We introduce logical and graphical syntax for quantum mechanical processes and prove that these formal systems provide sound and complete representations of abstract quantum mechanics. In addition, we demonstrate how these representations may be used to reason about the behaviour of quantum computational processes. Quantum computation is presently mired in low-level formalisms, mostly derived directly from matrices over Hilbert spaces. These formalisms are an obstacle to the full understanding and exploitation of quantum effects in informatics since they obscure the essential structure of quantum states and processes. The aim of this work is to introduce higher level tools for quantum mechanics which will be better suited to computation than those presently employed in the field. Inessential details of Hilbert space representations are removed and the informatic structures are presented directly. Entangled states are particularly important in this treatment, as is appropriate, since entanglement is a fundamental driver of quantum computation. The benefits two-fold: as well as producing foundational tools for the study of quantum computation this work also connects quantum mechanics to mainstream areas of computer science such as categorical logic, type theory, program language semantics, and rewriting. We describe, following Abramsky and Coecke, how quantum mechanics may be carried out without reference to Hilbert space, in a strongly compact closed category. In particular we show how to freely construct a categorical model of abstract quantum mechanics from an arbitrary category. We introduceMultiplicative Categorical Quantum Logic (mCQL), a sequent calculus whose proof rules capture the structure of compact closed categories. This sequent calculus is interpreted in a freely generated compact closed category, and its semantics is sound with respect to cut elimination. We define an equivalent graphical syntax, similar to linear logic’s proof-nets, and prove that these proof-nets provide a full and faithful representation of any freely generated compact closed category. Further analysis of the structure of quantum states which correspond to mCQL proofs using multiplicative linear logic shows that the linear type system describes the quantum entanglement found in such states. We show that the entanglement present in these states is always of a particularly simple form: collections of entangled pairs. In order to tackle arbitrary entanglement, we generalise the work of Kelly and Laplaza to give a representation theorem for the free compact closed category by a polycategory. Such categories are shown to be equivalent to a generalised system of proof-nets whose axioms may have more than one premise
Qubits are a great way to build a quantum computer, but a limited way to program one. We replace the usual "states and gates" formalism with a "props and ops" (propositions and operators) model in which (a) the C*-algebra of observables supplies the syntax; (b) states, viewed as linear functionals, give the semantics; and (c) a novel diagrammatic calculus unifies the two. The first part develops the basic objects of the framework, encoding consistent patterns of operator correlation, recovering Hilbert space via the GNS construction, and re-deriving the Bloch sphere as the set of all consistent correlations of operators in the Pauli algebra. We then turn to intervention, showing how measurement modifies state, proving an operator-algebraic version of the Knill-Laflamme conditions, and expressing stabilizer codes with the same diagrammatic machinery. This provides a concise, representation-agnostic account of quantum error correction. The result is a self-contained foundation in which C*-algebras, and their dual Hilbert spaces, offer a rich and universal substrate for quantum programming; forthcoming papers will build a high-level language and quantum software applications on top of this substrate.
This tutorial documents our opinion that quantum concepts are declarative in nature, and that using imperative programming for quantum computation is a conceptual mismatch. We show how to construct a purely functional framework that describes a methodologically more correct (in our opinion) model of quantum entities. We refrain from representing explicitly, as data structures, such objects as states which cannot be analysed without being destroyed. We suggest that a declarative, purely functional approach gives formal tools that are more adequate for reasoning about the computational sense/contents of quantum entities, and in general of several mathematical constructs considered abstract. We show that this approach can be used in practice, and we suggest that it also can shed some light on the sense of the linearity -- the geometric property of vector spaces -- within the quantum framework.
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.
With a view towards models of quantum computation, we define a functional language where all functions are linear operators by construction. A small step operational semantic (and hence an interpreter/simulator) is provided for this language in the form of a term rewrite systems. The linear-algebraic -calculus hereby constructed is linear in a different (yet related) sense to that, say, of the linear -calculus. These various notions of linearity are discussed in the context of quantum programming languages .
Hilbert spaces provide the fundamental mathematical framework for describing quantum mechanical systems. Their structure, characterized by an inner product and completeness, allows for the representation of quantum states as vectors and physical observables as self-adjoint operators. Key quantum phenomena such as superposition and entanglement find natural expression within this formalism. Superposition, where a quantum system can exist in multiple states simultaneously, is represented by linear combinations of basis vectors in the Hilbert space. Entanglement, a non-classical correlation between quantum systems, is described by non-separable state vectors in a tensor product of Hilbert spaces. These concepts are pivotal in quantum computing, where the unit of information, the qubit, is a two-level quantum system whose state is a vector in a two-dimensional complex Hilbert space (ℂ²). Quantum gates, which perform operations on qubits, are represented by unitary operators acting on these state vectors. The power of quantum computation, particularly in algorithms like Shor's or Grover's, stems from the ability to exploit superposition and entanglement, processes intrinsically described within the Hilbert space framework. Thus, a thorough understanding of Hilbert spaces is indispensable for grasping the principles of quantum mechanics and for advancing the field of quantum information and computation [1, 7]. The transition from classical bits to quantum qubits, and from classical logic gates to quantum unitary operations, is entirely predicated on the mathematical properties endowed by Hilbert spaces.