Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

Modeling Quantum Computing Constraints: No-Cloning Theorem and Monadic Expressiveness with Type-Level Programming

Flávio Borin Júnior, Juliana Kaizer Vizzotto

Published Sep 22, 2025• 0 citations
Publisher

Abstract

This paper presents a type-safe model of quantum computing, building upon the model introduced by Sabry in Haskell. By applying type-level programming techniques, we extend the model to constrain invalid operations and states at compile time. Our implementation enforces the no-cloning theorem at the type level via memory access patterns, while maintaining expressiveness via monadic composition of quantum operations. The implementation serves both as an introduction to quantum computing fundamentals and as a case study in enforcing physical constraints through a functional programming type system.

DOI
10.5753/sblp.2025.13218

Related papers

A Metamodeling Approach to Enforcing the No-Cloning Theorem in Quantum Software Engineering

Dae‐Kyoo Kim

Quantum software development utilizes quantum phenomena such as superposition and entanglement to address problems that are challenging for classical systems. However, it must also adhere to critical quantum constraints, notably the no-cloning theorem, which prohibits the exact duplication of unknown quantum states and has profound implications for cryptography, secure communication, and error correction. While existing quantum circuit representations implicitly honor such constraints, they lack formal mechanisms for early-stage verification in software design. Addressing this constraint at the design phase is essential to ensure the correctness and reliability of quantum software. This paper presents a formal metamodeling framework using UML-style notation and and Object Constraint Language (OCL) to systematically capture and enforce the no-cloning theorem within quantum software models. The proposed metamodel formalizes key quantum concepts—such as entanglement and teleportation—and encodes enforceable invariants that reflect core quantum mechanical laws. The framework’s effectiveness is validated by analyzing two critical edge cases—conditional copying with CNOT gates and quantum teleportation—through instance model evaluations. These cases demonstrate that the metamodel can capture nuanced scenarios that are often mistaken as violations of the no-cloning theorem but are proven compliant under formal analysis. Thus, these serve as constructive validations that demonstrate the metamodel’s expressiveness and correctness in representing operations that may appear to challenge the no-cloning theorem but, upon rigorous analysis, are shown to comply with it. The approach supports early detection of conceptual design errors, promoting correctness prior to implementation. The framework’s extensibility is also demonstrated by modeling projective measurement, further reinforcing its applicability to broader quantum software engineering tasks. By integrating the rigor of metamodeling with fundamental quantum mechanical principles, this work provides a structured, model-driven approach that enables traditional software engineers to address quantum computing challenges. It offers practical insights into embedding quantum correctness at the modeling level and advances the development of reliable, error-resilient quantum software systems.

Computers, materials & continua/Computers, materials & continua (Print)•Jan 1, 2025•0 citations

Structuring quantum effects: superoperators as arrows

Juliana Kaizer Vizzotto, Thorsten Altenkirch, Amr Sabry

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.

arXiv:quant-ph/0501151•Mathematical Structures in Computer Science•Jun 1, 2006•46 citations

Quantum Lambda Calculus

Peter Selinger, Benoît Valiron

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. 4.1 Introduction The lambda calculus, developed in the 1930s by Church and Curry, is a formalism for expressing higher-order functions. In a nutshell, a higher-order function is a function that inputs or outputs a “black box,” which is itself a (possibly higher-order) function. Higher-order functions are a computationally powerful tool. Indeed, the pure untyped lambda calculus has the same computational power as Turing machines (Turing 1937). At the same time, higher-order functions are a useful abstraction for programmers. They form the basis of functional programming languages such as LISP (McCarthy 1960), Scheme (Sussman and Steele 1975), ML (Milner 1978), and Haskell (Hudak et al. 2007). In this chapter, we discuss how to combine higher-order functions with quantum computation. We believe that this is an interesting question for a number of reasons. First, the combination of higher-order functions with quantum phenomena raises the prospect of entangled functions . Certain well-known quantum phenomena can be naturally described in terms of entangled functions, and we give some examples of this in Section 4.2.

Cambridge University Press eBooks•Nov 30, 2009•103 citations

Towards a formally verified functional quantum programming language

Alexander S. Green

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\nverified 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.

•Jul 20, 2010•6 citations

Concurrent Quantum Programming in Haskell

Juliana Kaizer Vizzotto, Antônio Carlos da Rocha Costa

This paper applies established techniques for concurrent programming in Haskell to the case of Concurrent Quantum Programming. The foundation of the approach is an extension to Concurrent Quantum Programming of the technique of “virtual values ” proposed by Amr Sabry for quantum programming in Haskell. The basic idea is to encapsulate quantum values within MVars, the monadic variables that support thread synchronization and mutually exclusive accesses to shared references. In this way, quantum processes can be concurring to have access to quantum values and we will be applying the now established quantum programming paradigm of “control is classic, data is quantum ” to the concurrent and distributed quantum programming domain: the case in focus is that the control of concurrency is classical control, while shared data between quantum processes are quantum data. We illustrate the use of the proposed approach by programming sample algorithms for quantum teleportation and quantum cryptographic key distribution. 1.

Congresso Brasileiro de Redes Neurais (CBRN)•Aug 29, 2016•9 citations

Structuring General and Complete Quantum Computations in Haskell: The Arrows Approach

Juliana Kaizer Vizzotto, Antônio Carlos da Rocha Costa, Amr Sabry

In this thesis we argue that a realistic model for quantum computations should be general with respect to measurements, and complete with respect to the information flow between the quantum and classical worlds. We thus structure general and complete quantum programming in Haskell using well known constructions from classical semantics and programming languages, like monads and arrows. The result connects “generic” and “complete” quantum features to well-founded semantics constructions and programming languages.

Anais do Concurso de Teses e Dissertações da SBC (CTD-SBC)•Jun 30, 2007•0 citations
This paper presents a type-safe model of quantum computing, building upon the model introduced by Sabry in Haskell. By applying type-level programming techniques, we extend the model to constrain invalid operations and states at compile time. Our implementation enforces the no-cloning theorem at the type level via memory access patterns, while maintaining expressiveness via monadic composition of quantum operations. The implementation serves both as an introduction to quantum computing fundamentals and as a case study in enforcing physical constraints through a functional programming type system.
Quantum software development utilizes quantum phenomena such as superposition and entanglement to address problems that are challenging for classical systems. However, it must also adhere to critical quantum constraints, notably the no-cloning theorem, which prohibits the exact duplication of unknown quantum states and has profound implications for cryptography, secure communication, and error correction. While existing quantum circuit representations implicitly honor such constraints, they lack formal mechanisms for early-stage verification in software design. Addressing this constraint at the design phase is essential to ensure the correctness and reliability of quantum software. This paper presents a formal metamodeling framework using UML-style notation and and Object Constraint Language (OCL) to systematically capture and enforce the no-cloning theorem within quantum software models. The proposed metamodel formalizes key quantum concepts—such as entanglement and teleportation—and encodes enforceable invariants that reflect core quantum mechanical laws. The framework’s effectiveness is validated by analyzing two critical edge cases—conditional copying with CNOT gates and quantum teleportation—through instance model evaluations. These cases demonstrate that the metamodel can capture nuanced scenarios that are often mistaken as violations of the no-cloning theorem but are proven compliant under formal analysis. Thus, these serve as constructive validations that demonstrate the metamodel’s expressiveness and correctness in representing operations that may appear to challenge the no-cloning theorem but, upon rigorous analysis, are shown to comply with it. The approach supports early detection of conceptual design errors, promoting correctness prior to implementation. The framework’s extensibility is also demonstrated by modeling projective measurement, further reinforcing its applicability to broader quantum software engineering tasks. By integrating the rigor of metamodeling with fundamental quantum mechanical principles, this work provides a structured, model-driven approach that enables traditional software engineers to address quantum computing challenges. It offers practical insights into embedding quantum correctness at the modeling level and advances the development of reliable, error-resilient quantum software systems.
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.
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. 4.1 Introduction The lambda calculus, developed in the 1930s by Church and Curry, is a formalism for expressing higher-order functions. In a nutshell, a higher-order function is a function that inputs or outputs a “black box,” which is itself a (possibly higher-order) function. Higher-order functions are a computationally powerful tool. Indeed, the pure untyped lambda calculus has the same computational power as Turing machines (Turing 1937). At the same time, higher-order functions are a useful abstraction for programmers. They form the basis of functional programming languages such as LISP (McCarthy 1960), Scheme (Sussman and Steele 1975), ML (Milner 1978), and Haskell (Hudak et al. 2007). In this chapter, we discuss how to combine higher-order functions with quantum computation. We believe that this is an interesting question for a number of reasons. First, the combination of higher-order functions with quantum phenomena raises the prospect of entangled functions . Certain well-known quantum phenomena can be naturally described in terms of entangled functions, and we give some examples of this in Section 4.2.
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\nverified 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.
This paper applies established techniques for concurrent programming in Haskell to the case of Concurrent Quantum Programming. The foundation of the approach is an extension to Concurrent Quantum Programming of the technique of “virtual values ” proposed by Amr Sabry for quantum programming in Haskell. The basic idea is to encapsulate quantum values within MVars, the monadic variables that support thread synchronization and mutually exclusive accesses to shared references. In this way, quantum processes can be concurring to have access to quantum values and we will be applying the now established quantum programming paradigm of “control is classic, data is quantum ” to the concurrent and distributed quantum programming domain: the case in focus is that the control of concurrency is classical control, while shared data between quantum processes are quantum data. We illustrate the use of the proposed approach by programming sample algorithms for quantum teleportation and quantum cryptographic key distribution. 1.
In this thesis we argue that a realistic model for quantum computations should be general with respect to measurements, and complete with respect to the information flow between the quantum and classical worlds. We thus structure general and complete quantum programming in Haskell using well known constructions from classical semantics and programming languages, like monads and arrows. The result connects “generic” and “complete” quantum features to well-founded semantics constructions and programming languages.