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

Congresso Brasileiro de Redes Neurais (CBRN)

Concurrent Quantum Programming in Haskell

Juliana Kaizer Vizzotto, Antônio Carlos da Rocha Costa

Published Aug 29, 2016• 5 citations
Publisher

Abstract

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.

DOI
10.21528/cbrn2005-229

Related papers

Modelling Parallel Quantum Computing Using Transactional Memory

Juliana Kaizer Vizzotto, André Rauber Du Bois

We propose a model for parallel quantum computing in a single ensemble quantum computer using Haskell's software transaction memory. The parallel ensemble quantum computer possesses, besides quantum parallelism, a kind of classical single-instruction-multiple-data parallelism. It explores additional speedup by making quantum computers working in parallel, as in classical computation. The whole state is prepared in such a way a subset of qubits is in a mixed state representing the communicating quantum computers while the other qubits in pure state are the proper argument registers of each quantum computer. Essentially, this particular way of structuring the state of the parallel quantum computer fits with what is well know as multithreading programming. Software transactional memory is a promising new approach to programming shared-memory parallel programs. The functional programming language Haskell elegantly implements this abstraction for concurrent communication.

Electronic Notes in Theoretical Computer Science•Feb 1, 2011•2 citations

Exploring a Quantum Programming Language with Concurrency

Jain, Manisha, Fernandes, Vitor, Madeira, Alexandre +1 more

In quantum programming, as in the classical case, concurrent control is a form of program coordination that proves well suited to express complex composition patterns. This paper introduces a quantum programming language with explicit parallel and synchronization primitives and its semantics. The language is explored through a Maude implementation, and illustrated with two non trivial examples.

OASIcs : OpenAccess Series in Informatics•Jan 1, 2025•0 citations

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

Flávio Borin Júnior, Juliana Kaizer Vizzotto

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.

•Sep 22, 2025•0 citations

Quantum Principles in Concurrency: Toward Resolving Classical Synchronization Problems

Yuanjie Li, Jinsuk Baek, Minho Jo

This paper investigates the application of quantum principles -most notably superposition and entanglement -to reframe classical concurrency problems in software engineering.While other research has explored quantum concepts primarily as tools for parallelization, this work advances the discourse by proposing quantum-inspired abstractions for reasoning about mutual exclusion, race conditions, deadlocks, and the producer-consumer problem.By treating threads and shared resources as qubits and modeling their interactions via correlated quantum states within an abstract state-space, we present a framework that illustrates how quantum formalisms can conceptually model concurrency patterns, supported by mathematical formulations in Dirac notation and circuit representations.Superposition naturally models multiple execution paths, while entanglement provides symbolic global correlations rather than operational synchronization, offering new perspectives on longstanding concurrency challenges.Our simulations across four scenarios demonstrate that these quantum-inspired formulations can highlight order-sensitivity and contention patterns in a unified mathematical setting.These results do not constitute practical concurrency mechanisms, but they suggest how quantum principles may inform future hybrid quantumclassical analysis tools.We also conclude with a discussion on potential integration into hybrid systems, highlighting both practical benefits and open challenges.

KSII Transactions on Internet and Information Systems•May 31, 2026•0 citations

On the Automation of Encoding Processes in the Quantum IO Monad

James Barratt

It is now clear that the use of resilient encoding schemes will be required for any quantum computing device to be realised. However, quantum programmers of the future will not wish to be tied up in the particulars of such encoding schemes. Quantum programming languages and libraries are already being developed, one of which is the Quantum IO Monad. QIO, as it is often abbreviated to, provides an interface to define and simulate quantum computations via a library of functions written in Haskell, a purely functional programming language. A solution is presented that takes an arbitrary QIO program and returns an equivalent program incorporating some specified quantum error correction techniques.

arXiv:1210.0611•Electronic Proceedings in Theoretical Computer Science•Oct 1, 2012•1 citation

The Quantum IO Monad

Thorsten Altenkirch, Alexander S. Green

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.1 Introduction We present an interface from a pure functional programming language, Haskell, to quantum programming: the quantum IO monad, and use it to implement Shor's factorization algorithm. The implementation of the QIO monad provides a constructive semantics for quantum programming, i.e ., a functional program that can also be understood as a mathematical model of quantum computing. Actually, the Haskell QIO library is only a first approximation of such a semantics; we would like to move to a more expressive language that is also logically sound. Here we are thinking of a language such as Agda (Norell 2007), which is based on Martin Löf's type theory. We have already investigated this approach of functional specifications of effects in a classical context (Swierstra and Altenkirch 2007, 2008; Swierstra 2008). At the same time the QIO monad provides a high-level interface to a hypothetical quantum computer.

Cambridge University Press eBooks•Nov 30, 2009•37 citations
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.
We propose a model for parallel quantum computing in a single ensemble quantum computer using Haskell's software transaction memory. The parallel ensemble quantum computer possesses, besides quantum parallelism, a kind of classical single-instruction-multiple-data parallelism. It explores additional speedup by making quantum computers working in parallel, as in classical computation. The whole state is prepared in such a way a subset of qubits is in a mixed state representing the communicating quantum computers while the other qubits in pure state are the proper argument registers of each quantum computer. Essentially, this particular way of structuring the state of the parallel quantum computer fits with what is well know as multithreading programming. Software transactional memory is a promising new approach to programming shared-memory parallel programs. The functional programming language Haskell elegantly implements this abstraction for concurrent communication.
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.
This paper investigates the application of quantum principles -most notably superposition and entanglement -to reframe classical concurrency problems in software engineering.While other research has explored quantum concepts primarily as tools for parallelization, this work advances the discourse by proposing quantum-inspired abstractions for reasoning about mutual exclusion, race conditions, deadlocks, and the producer-consumer problem.By treating threads and shared resources as qubits and modeling their interactions via correlated quantum states within an abstract state-space, we present a framework that illustrates how quantum formalisms can conceptually model concurrency patterns, supported by mathematical formulations in Dirac notation and circuit representations.Superposition naturally models multiple execution paths, while entanglement provides symbolic global correlations rather than operational synchronization, offering new perspectives on longstanding concurrency challenges.Our simulations across four scenarios demonstrate that these quantum-inspired formulations can highlight order-sensitivity and contention patterns in a unified mathematical setting.These results do not constitute practical concurrency mechanisms, but they suggest how quantum principles may inform future hybrid quantumclassical analysis tools.We also conclude with a discussion on potential integration into hybrid systems, highlighting both practical benefits and open challenges.
It is now clear that the use of resilient encoding schemes will be required for any quantum computing device to be realised. However, quantum programmers of the future will not wish to be tied up in the particulars of such encoding schemes. Quantum programming languages and libraries are already being developed, one of which is the Quantum IO Monad. QIO, as it is often abbreviated to, provides an interface to define and simulate quantum computations via a library of functions written in Haskell, a purely functional programming language. A solution is presented that takes an arbitrary QIO program and returns an equivalent program incorporating some specified quantum error correction techniques.
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.1 Introduction We present an interface from a pure functional programming language, Haskell, to quantum programming: the quantum IO monad, and use it to implement Shor's factorization algorithm. The implementation of the QIO monad provides a constructive semantics for quantum programming, i.e ., a functional program that can also be understood as a mathematical model of quantum computing. Actually, the Haskell QIO library is only a first approximation of such a semantics; we would like to move to a more expressive language that is also logically sound. Here we are thinking of a language such as Agda (Norell 2007), which is based on Martin Löf's type theory. We have already investigated this approach of functional specifications of effects in a classical context (Swierstra and Altenkirch 2007, 2008; Swierstra 2008). At the same time the QIO monad provides a high-level interface to a hypothetical quantum computer.