| Chapter 1 Shor in Haskell The Quantum IO Monad (2008) | |||||||||||||||||
Abstract | |||||||||||||||||
| Quantum IO monad, and use it to implement Shor’s factorisation algorithm. 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. Exploiting Haskell’s class system we can present our algorithms in a high level way, implementing abstractions in the functional paradigm. We describe the implementation of Shor’s algorithm in some detail also covering the necessary reversible arithmetic. QIO programs can be simulated either by calculating a probability distribution or by embedding it into the IO monad using the random number generator. 1.1 | |||||||||||||||||
Publication details | |||||||||||||||||
| |||||||||||||||||