Safe Haskell | None |
---|---|
Language | Haskell98 |
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
- d_of_ideal :: Ideal -> Integer
- d_of_idealQ :: IdealQ -> Integer
- equal_d_of_ideals :: Ideal -> Ideal -> BoolParam
- equal_d_of_idealQs :: IdealQ -> IdealQ -> BoolParam
- template_equal_d_of_ideals :: Circ (IdealQ -> Circ (IdealQ -> Circ BoolParam))
- template_and :: Circ ([Qubit] -> Circ Qubit)
- m_of_ideal :: Ideal -> IntM
- l_of_ideal :: Ideal -> IntM
- a_of_ideal :: Ideal -> IntM
- b_of_ideal :: Ideal -> IntM
- template_m_of_ideal :: Circ (IdealQ -> Circ QDInt)
- template_l_of_ideal :: Circ (IdealQ -> Circ QDInt)
- template_a_of_ideal :: Circ (IdealQ -> Circ QDInt)
- template_b_of_ideal :: Circ (IdealQ -> Circ QDInt)
- one_of_size :: IntM -> IntM
- template_one_of_size :: Circ (QDInt -> Circ QDInt)
- isReduced :: Ideal -> Bool
- template_isReduced :: Circ (IdealQ -> Circ Qubit)
- assert :: Bool -> a -> a
- template_assert :: Circ (Qubit -> Circ (a -> Circ a))
- assertReduced :: Ideal -> a -> a
- template_assertReduced :: Circ (IdealQ -> Circ (y -> Circ y))
- idealEquals :: Ideal -> Ideal -> Bool
- template_idealEquals :: Circ (IdealQ -> Circ (IdealQ -> Circ Qubit))
- data BoolPair = BoolPair Bool Bool
- data QubitPair = QubitPair Qubit Qubit
- boolPair :: Bool -> Bool -> BoolPair
- template_boolPair :: (Monad m1, Monad m2, Monad m3) => m1 (Qubit -> m2 (Qubit -> m3 QubitPair))
- template_BoolPair :: Qubit -> Qubit -> QubitPair
- truePair :: BoolPair
- template_truePair :: Circ QubitPair
- template_myPlus :: QNum y => Circ (y -> Circ (y -> Circ y))
- test_is_reduced :: IO ()
- myPlus :: Int -> Int -> Int
- main :: IO ()
Auxiliary functions specific to the Class Number algorithm
d_of_ideal :: Ideal -> Integer Source #
d_of_idealQ :: IdealQ -> Integer Source #
m_of_ideal :: Ideal -> IntM Source #
l_of_ideal :: Ideal -> IntM Source #
a_of_ideal :: Ideal -> IntM Source #
b_of_ideal :: Ideal -> IntM Source #
one_of_size :: IntM -> IntM Source #
Functions from Quipper.Algorithms.CL.Types
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.
Functions from Quipper.Algorithms.CL.CL
Some dummy functions for testing
template_boolPair :: (Monad m1, Monad m2, Monad m3) => m1 (Qubit -> m2 (Qubit -> m3 QubitPair)) Source #
Some test functions
test_is_reduced :: IO () Source #