traq
Safe HaskellSafe-Inferred
LanguageHaskell2010

Traq.Analysis.CostModel.Class

Synopsis

Documentation

data QueryType #

Type of a query/execution: either run on a classical computer, or a quantum computer (as a unitary).

Constructors

Classical 
Unitary 

class (Monoidal c, Module (PrecType c) c) => CostModel c where #

A generic cost model

Methods

query :: QueryType -> Ident -> c #

Make one query to a function of the given name

callExpr :: QueryType -> BasicExpr sizeT -> c #

Execute an expression.

callDistrExpr :: QueryType -> DistrExpr sizeT -> c #

Execute a distribution (randomized) expression

Instances

Instances details
Rig a => CostModel (QueryCost a) # 
Instance details

Defined in Traq.Analysis.CostModel.QueryCost

(Module a a, Rig a) => CostModel (SimpleQueryCost a) # 
Instance details

Defined in Traq.Analysis.CostModel.QueryCost