traq
Safe HaskellSafe-Inferred
LanguageHaskell2010

Traq.Compiler.Quantum

Contents

Synopsis

Documentation

lowerProgram :: forall ext size prec. (TypingReqs size, Floating prec, HasFreeVars ext, CompileQ ext, TypeInferrable ext size, PrecType ext ~ prec, SizeType ext ~ size) => Program ext -> Either String (Program size) #

Lower a full program into a CQPL program.

Class

class CompileU ext => CompileQ ext where #

Methods

compileQ :: forall ext' m. (m ~ CompilerT ext', SizeType ext ~ SizeType ext', PrecType ext ~ PrecType ext', CompileQ ext') => ext -> [Ident] -> m (Stmt (SizeType ext)) #

Instances

Instances details
(TypeCheckPrim prim (SizeType prim), TypingReqs (SizeType prim), UnitaryCompilePrim prim (SizeType prim) (PrecType prim), QuantumCompilePrim prim (SizeType prim) (PrecType prim)) => CompileQ (AnnFailProb (Primitive prim)) # 
Instance details

Defined in Traq.Primitives.Class

Methods

compileQ :: forall ext' m. (m ~ CompilerT ext', SizeType (AnnFailProb (Primitive prim)) ~ SizeType ext', PrecType (AnnFailProb (Primitive prim)) ~ PrecType ext', CompileQ ext') => AnnFailProb (Primitive prim) -> [Ident] -> m (Stmt (SizeType (AnnFailProb (Primitive prim)))) #

TypingReqs size => CompileQ (Core size prec) # 
Instance details

Defined in Traq.Compiler.Quantum

Methods

compileQ :: forall ext' m. (m ~ CompilerT ext', SizeType (Core size prec) ~ SizeType ext', PrecType (Core size prec) ~ PrecType ext', CompileQ ext') => Core size prec -> [Ident] -> m (Stmt (SizeType (Core size prec))) #