Safe Haskell | None |
---|---|
Language | Haskell98 |
This module contains definitions to work with Template Haskell. All the definitions in this module are used by Template Haskell in Quipper.Algorithms.QLS.TemplateOracle and Quipper.Algorithms.QLS.RealFunc.
Synopsis
- grepn :: Eq a => [a] -> [a] -> Int
- template_symb_slash_symb_equal_ :: (Typeable qa, QOrd qa) => Circ (qa -> Circ (qa -> Circ Qubit))
- template_symb_oangle_ :: (Typeable qa, QOrd qa) => Circ (qa -> Circ (qa -> Circ Qubit))
- template_symb_oangle_symb_equal_ :: (Typeable qa, QOrd qa) => Circ (qa -> Circ (qa -> Circ Qubit))
- template_symb_cangle_ :: (Typeable qa, QOrd qa) => Circ (qa -> Circ (qa -> Circ Qubit))
- template_symb_cangle_symb_equal_ :: (Typeable qa, QOrd qa) => Circ (qa -> Circ (qa -> Circ Qubit))
- template_symb_minus_ :: (Typeable qa, QNum qa) => Circ (qa -> Circ (qa -> Circ qa))
- template_symb_plus_ :: (Typeable qa, QNum qa) => Circ (qa -> Circ (qa -> Circ qa))
- template_symb_star_ :: (Typeable qa, QNum qa) => Circ (qa -> Circ (qa -> Circ qa))
- template_negate :: (Typeable qa, QNum qa) => Circ (qa -> Circ qa)
- template_abs :: (Typeable qa, QNum qa) => Circ (qa -> Circ qa)
- template_mod :: Circ (QSignedInt -> Circ (QSignedInt -> Circ QSignedInt))
- template_symb_slash_ :: Circ (QDouble -> Circ (QDouble -> Circ QDouble))
- local_pi :: FDouble
- template_local_pi :: Circ QDouble
- id_fdouble :: FDouble -> FDouble
- template_id_fdouble :: Circ (QDouble -> Circ QDouble)
- template_floor :: Circ (QDouble -> Circ QSignedInt)
- template_ceiling :: Circ (QDouble -> Circ QSignedInt)
- template_fromIntegral :: Circ (QSignedInt -> Circ QDouble)
- template_rational :: Double -> Circ QDouble
- template_integer :: Int -> Circ QSignedInt
- getIntFromParam :: Int -> Int
- template_getIntFromParam :: Circ (Int -> Circ QSignedInt)
- paramZero :: Int
- template_paramZero :: Circ Int
- paramTen :: Int
- template_paramTen :: Circ Int
- paramSucc :: Int -> Int
- template_paramSucc :: Circ (Int -> Circ Int)
- paramPred :: Int -> Int
- template_paramPred :: Circ (Int -> Circ Int)
- paramMinus :: Int -> Int -> Int
- template_paramMinus :: Circ (Int -> Circ (Int -> Circ Int))
- template_length :: Circ ([a] -> Circ QSignedInt)
- take_half :: [a] -> [a]
- template_take_half :: Circ ([a] -> Circ [a])
Utility function
grepn :: Eq a => [a] -> [a] -> Int Source #
: Counts how many times regexp is a
sublist of list.grepn
regexp list
Lifting of ordering operators.
template_symb_slash_symb_equal_ :: (Typeable qa, QOrd qa) => Circ (qa -> Circ (qa -> Circ Qubit)) Source #
Template version of /=
.
template_symb_oangle_ :: (Typeable qa, QOrd qa) => Circ (qa -> Circ (qa -> Circ Qubit)) Source #
Template version of <
.
template_symb_oangle_symb_equal_ :: (Typeable qa, QOrd qa) => Circ (qa -> Circ (qa -> Circ Qubit)) Source #
Template version of <=
.
template_symb_cangle_ :: (Typeable qa, QOrd qa) => Circ (qa -> Circ (qa -> Circ Qubit)) Source #
Template version of >
.
template_symb_cangle_symb_equal_ :: (Typeable qa, QOrd qa) => Circ (qa -> Circ (qa -> Circ Qubit)) Source #
Template version of >=
.
Lifting of arithmetic operators
template_symb_minus_ :: (Typeable qa, QNum qa) => Circ (qa -> Circ (qa -> Circ qa)) Source #
Template version of -
.
template_symb_plus_ :: (Typeable qa, QNum qa) => Circ (qa -> Circ (qa -> Circ qa)) Source #
Template version of +
.
template_symb_star_ :: (Typeable qa, QNum qa) => Circ (qa -> Circ (qa -> Circ qa)) Source #
Template version of *
.
template_negate :: (Typeable qa, QNum qa) => Circ (qa -> Circ qa) Source #
Template version of negate
.
template_mod :: Circ (QSignedInt -> Circ (QSignedInt -> Circ QSignedInt)) Source #
Template version of mod
Operations on QDouble
template_symb_slash_ :: Circ (QDouble -> Circ (QDouble -> Circ QDouble)) Source #
Template version of /
on Fractional
.
id_fdouble :: FDouble -> FDouble Source #
The identity function of type FDouble
. This is used to help the
type checker work around a problem in GHC 8.0, where types of
overloaded operations sometimes require disambiguation.
template_id_fdouble :: Circ (QDouble -> Circ QDouble) Source #
Template version of id_fdouble
.
Relation between QDouble
and QSignedInt
.
template_floor :: Circ (QDouble -> Circ QSignedInt) Source #
Template version of floor
.
template_ceiling :: Circ (QDouble -> Circ QSignedInt) Source #
Template version of ceiling
.
template_fromIntegral :: Circ (QSignedInt -> Circ QDouble) Source #
Template version of fromIntegral
.
Dealing with parameters.
template_integer :: Int -> Circ QSignedInt Source #
Lift an integer to QSignedInt
.
template_getIntFromParam :: Circ (Int -> Circ QSignedInt) Source #
Template version of getIntFromParam
.
template_paramMinus :: Circ (Int -> Circ (Int -> Circ Int)) Source #
Template version of paramMinus
.
Miscellaneous operations.
template_length :: Circ ([a] -> Circ QSignedInt) Source #
Lifted version of
.length