{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LINE 1 "Quipper/Algorithms/QLS/Utils.hs" #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Quipper.Algorithms.QLS.Utils where
import Quipper
import Control.Monad
import Data.List
import Quipper.Internal.Control
import qualified Data.Map as Map
fixed_int_register_length :: Int
fixed_int_register_length = 32
before_radix_length :: Int
before_radix_length = 32
after_radix_length :: Int
after_radix_length = 32
ncompose :: Int -> (a -> a) -> a -> a
ncompose 0 f x = x
ncompose n f x = ncompose (n-1) f (f x)
listpair_fmap :: (a -> b) -> [(a,a)] -> [(b,b)]
listpair_fmap f t = map (\(x,y) -> (f x,f y)) t