Skip to main content
QUICK REVIEW

[Paper Review] Formal Quantum Software Engineering: Introducing the Formal Methods of Software Engineering to Quantum Computing

Carmelo R. Cartiere|arXiv (Cornell University)|Jan 1, 2020
Quantum Computing Algorithms and ArchitectureComputer Science7 references2 citations
TL;DR

This paper introduces Formal Quantum Software Engineering (F-QSE), a framework that applies formal methods from software engineering—specifically the Z notation and first-order logic—to quantum computing. By formalizing quantum observables and gates as axiomatic definitions, it enables precise, machine-checkable specifications of quantum algorithms, demonstrated through the Deutsch algorithm, thereby lowering the barrier to entry for software engineers in quantum development.

ABSTRACT

Quantum computing (QC) represents the future of computing systems, but the tools for reasoning about the quantum model of computation, in which the laws obeyed are those on the quantum mechanical scale, are still a mix of linear algebra and Dirac notation; two subjects more suitable for physicists, rather than computer scientists and software engineers. On this ground, we believe it is possible to provide a more intuitive approach to thinking and writing about quantum computing systems, in order to simplify the design of quantum algorithms and the development of quantum software. In this paper, we move the first step in such direction, introducing a specification language as the tool to represent the operations of a quantum computer via axiomatic definitions, by adopting the same symbolisms and reasoning principles used by formal methods in software engineering. We name this approach formal quantum software engineering (F-QSE). This work assumes familiarity with the basic principles of quantum mechanics (QM), with the use of Zed (Z) which is a formal language of software engineering (SE), and with the notation and techniques of first-order logic (FOL) and functional programming (FP).

Motivation & Objective

  • To address the conceptual and notational barrier that hinders software engineers from entering quantum computing.
  • To bridge the gap between quantum mechanics and software engineering by adopting formal methods.
  • To provide a specification language based on Z notation and first-order logic for describing quantum systems.
  • To enable the formal, axiomatic description of quantum observables and gates as a foundation for verifiable quantum software.
  • To demonstrate the feasibility of translating formal specifications into executable quantum programs.

Proposed method

  • Uses the Z notation to formally define quantum observables as Hermitian matrices satisfying three axioms: complex square matrix, self-conjugate transpose, and real eigenvalues.
  • Applies first-order logic and functional programming principles to define quantum gates (e.g., Hadamard, C-NOT, Pauli-X, Phase Shift) as unitary, reversible transformations.
  • Defines quantum operations through axiomatic predicates that capture their mathematical and logical behavior.
  • Translates the Deutsch algorithm into formal Z specifications, modeling superposition, entanglement, and measurement via axiomatic gate sequences.
  • Maps the formal specifications to executable code using Haskell and the QIO library, ensuring semantic fidelity.
  • Employs sound formalism to ensure correctness and consistency in quantum algorithm design.

Experimental results

Research questions

  • RQ1How can formal methods from software engineering be adapted to model quantum computing systems?
  • RQ2Can quantum observables and gates be formally specified using first-order logic and type systems?
  • RQ3How can axiomatic definitions in Z notation improve the clarity and correctness of quantum algorithm design?
  • RQ4To what extent can formal specifications be directly translated into executable quantum programs?
  • RQ5Can this approach lower the barrier to entry for software engineers in quantum computing?

Key findings

  • The paper successfully formalizes quantum observables as Hermitian matrices using Z notation and first-order logic, ensuring mathematical rigor.
  • Key quantum gates—including Hadamard, C-NOT, and Pauli-X—are formally defined as unitary, reversible operations with axiomatic constraints.
  • The Deutsch algorithm is specified in Z notation, capturing superposition, entanglement, and measurement through formal gate sequences.
  • The formal specification is directly translatable into executable code using Haskell and the QIO library, demonstrating end-to-end traceability.
  • The approach enables a clear, verifiable, and intuitive pathway from specification to implementation, reducing reliance on Dirac notation.
  • The formal framework offers a promising foundation for building verifiable, maintainable, and composable quantum software.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.