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
(Integral sizeT, Floating precT, RealFloat precT, TypingReqs sizeT, Show precT, sizeT ~ SizeT) => CompileQ (AnnFailProb (DefaultPrims sizeT precT)) # 
Instance details

Defined in Traq.Primitives

Methods

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

(Integral sizeT, RealFloat precT, sizeT ~ SizeT, Show sizeT, Show precT, TypingReqs sizeT) => CompileQ (AnnFailProb (Primitive (QSearchCFNW sizeT precT))) # 
Instance details

Defined in Traq.Primitives.Search.QSearchCFNW

Methods

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

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))) #