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

QIO.Qio

Documentation

newtype Unitary Source

Constructors

U 

Fields

unU :: Int -> HeapMap -> Pure
 

Instances

data StateQ Source

Constructors

StateQ 

Fields

free :: Int
 
pure :: Pure
 

data Split Source

Constructors

Split 

Fields

p :: RR
 
ifTrue :: Pure
 
ifFalse :: Pure
 

class Monad m => PMonad m whereSource

Methods

merge :: RR -> m a -> m a -> m aSource

Instances

data Prob a Source

Constructors

Prob 

Fields

unProb :: Vec RR a
 

Instances

evalWith :: PMonad m => QIO a -> State StateQ (m a)Source

eval :: PMonad m => QIO a -> m aSource

run :: QIO a -> IO aSource

sim :: QIO a -> Prob aSource