quipper-algorithms-0.9.0.0: A set of algorithms implemented in Quipper.

Safe HaskellNone
LanguageHaskell98

Quipper.Algorithms.CL.RegulatorTemplate

Contents

Description

An experimental adaptation of the code from Quipper.Algorithms.CL.Types, Quipper.Algorithms.CL.Math, etc. to build circuits automatically using Template Haskell and Quipper.Internal.CircLifting.

Extremely incomplete.

Synopsis

Auxiliary functions specific to the Class Number algorithm

Functions from Quipper.Algorithms.CL.Types

isReduced :: Ideal -> Bool Source #

Return True if the given ideal is reduced.

assert :: Bool -> a -> a Source #

An assert function will throw an error if the assertion is False.

template_assert :: Circ (Qubit -> Circ (a -> Circ a)) Source #

A hand-lifted version of assert, that will produce a circuit run-time error if the assertion doesn't hold. This is done by using an asserted discard.

assertReduced :: Ideal -> a -> a Source #

This will throw an error if the given ideal isn't reduced. The corresponding circuit will use an asserted termination, that will throw an error at circuit run-time if the assertion doesn't hold.

idealEquals :: Ideal -> Ideal -> Bool Source #

Check if a given ideal equals another ideal.

Functions from Quipper.Algorithms.CL.CL

Some dummy functions for testing

data BoolPair Source #

Constructors

BoolPair Bool Bool 

template_boolPair :: (Monad m1, Monad m2, Monad m3) => m1 (Qubit -> m2 (Qubit -> m3 QubitPair)) Source #

template_myPlus :: QNum y => Circ (y -> Circ (y -> Circ y)) Source #

Some test functions

A main function

main :: IO () Source #