The Quipper System

Safe HaskellNone

Quipper.Algorithms.QLS.CircLiftingImport

Description

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

Utility function

grepn :: Eq a => [a] -> [a] -> Int Source #

grepn regexp list: Counts how many times regexp is a sublist of 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_abs :: (Typeable qa, QNum qa) => Circ (qa -> Circ qa) Source #

Template version of abs .

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 .

local_pi :: FDouble Source #

The constant pi as an FDouble .

template_local_pi :: Circ QDouble Source #

Template version of local_pi .

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_rational :: Double -> Circ QDouble Source #

Lift a real number to QDouble .

template_integer :: Int -> Circ QSignedInt Source #

Lift an integer to QSignedInt .

getIntFromParam :: Int -> Int Source #

Make a parameter Int as a regular Int that can be lifted.

template_getIntFromParam :: Circ (Int -> Circ QSignedInt) Source #

Template version of getIntFromParam .

paramZero :: Int Source #

Parameter integer of value '0'.

template_paramZero :: Circ Int Source #

Template version of paramZero .

paramTen :: Int Source #

Parameter integer of value '10'.

template_paramTen :: Circ Int Source #

Template version of paramTen .

paramSucc :: Int -> Int Source #

Successor function acting on parameter Int .

template_paramSucc :: Circ (Int -> Circ Int) Source #

Template version of paramSucc .

paramPred :: Int -> Int Source #

Predecessor function acting on parameter Int .

template_paramPred :: Circ (Int -> Circ Int) Source #

Template version of paramPred .

paramMinus :: Int -> Int -> Int Source #

Subtraction of parameter integers.

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 .

take_half :: [a] -> [a] Source #

Return the first half of the input list.

template_take_half :: Circ ([a] -> Circ [a]) Source #

Lifted version of take_half .

AltStyle によって変換されたページ (->オリジナル) /