| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Traq.Compiler
Synopsis
- module Traq.Compiler.Prelude
- module Traq.Compiler.Quantum
- class (TypeInferrable ext (SizeType ext), Integral (SizeType ext)) => CompileU ext where
- lowerProgramU :: forall ext size prec. (CompileU ext, Show prec, Floating prec, HasFreeVars ext, prec ~ PrecType ext, size ~ SizeType ext, TypeInferrable ext size) => Program ext -> Either String (Program size)
- allocAncillaWithPref :: (size ~ SizeType ext, Eq size) => Ident -> VarType size -> CompilerT ext Ident
- allocAncilla :: (size ~ SizeType ext, Eq size) => VarType size -> CompilerT ext Ident
- withTag :: ParamTag -> [(Ident, VarType a)] -> [(Ident, ParamTag, VarType a)]
Documentation
module Traq.Compiler.Prelude
module Traq.Compiler.Quantum
class (TypeInferrable ext (SizeType ext), Integral (SizeType ext)) => CompileU ext where #
Methods
compileU :: forall ext' m. (m ~ CompilerT ext', SizeType ext ~ SizeType ext', PrecType ext ~ PrecType ext') => ext -> [Ident] -> m (UStmt (SizeType ext)) #
Instances
| (TypingReqs size, Integral size) => CompileU (AnnFailProb (Core size prec)) # | |
Defined in Traq.Compiler.Unitary | |
| (TypeCheckPrim prim (SizeType prim), TypingReqs (SizeType prim), UnitaryCompilePrim prim (SizeType prim) (PrecType prim), Integral (SizeType prim)) => CompileU (AnnFailProb (Primitive prim)) # | |
Defined in Traq.Primitives.Class | |
| (TypingReqs size, Integral size) => CompileU (Core size prec) # | |
lowerProgramU :: forall ext size prec. (CompileU ext, Show prec, Floating prec, HasFreeVars ext, prec ~ PrecType ext, size ~ SizeType ext, TypeInferrable ext size) => Program ext -> Either String (Program size) #
Lower a full program into a unitary QPL program.
allocAncillaWithPref :: (size ~ SizeType ext, Eq size) => Ident -> VarType size -> CompilerT ext Ident #
Allocate an ancilla register, and update the typing context.