QIO-1.2: The Quantum IO Monad is a library for defining quantum computations in Haskell

Safe HaskellSafe-Infered



This module provides an implementation of the Quantum Fourier Transform in QIO.



qft :: [Qbit] -> USource

Defines the unitary the represents appliying a Quantum Fourier Transform to the given quantum register.

qftAcu :: [Qbit] -> [Bool] -> [Bool] -> USource

The definition of the QFT unitary makes use of an accumulator, to repeatedly apply smaller QFTs to the tail of the given quantum register.

qftBase :: [Bool] -> Qbit -> USource

The "base" step involved in a QFT is a series of controlled rotations.

rotK :: Int -> Qbit -> USource

The rotation used in the QFT is a phase rotation, parameterised by the angle 1/(2^k)

tryQft :: Int -> QIO IntSource

A test of the QFT unitary, over a quantum integer initialised to n.