newsynth 0.2 → 0.2.0.1
raw patch · 4 files changed
+20/−4 lines, 4 filesdep ~basedep ~random
Dependency ranges changed: base, random
Files
- ChangeLog +6/−0
- Quantum/Synthesis/StepComp.hs +10/−0
- newsynth.cabal +3/−3
- programs/gridsynth.hs +1/−1
ChangeLog view
@@ -1,5 +1,11 @@ ChangeLog +v0.2.0.1 2014/10/08+ (2014/10/06) PS1 - updated dependencies for compatibility with+ base 4.7 and random 1.1.+ (2014/09/05) PS1 - fixed a bug where the actual T-count was output+ instead of the lower bound.+ v0.2 2014/03/12 (2014/03/12) NJR, PS1 - Added the new gridsynth algorithm from N. J. Ross and P. Selinger, "Optimal ancilla-free Clifford+T
Quantum/Synthesis/StepComp.hs view
@@ -4,6 +4,9 @@ module Quantum.Synthesis.StepComp where +import Control.Applicative (Applicative(..))+import Control.Monad (liftM, ap)+ -- ---------------------------------------------------------------------- -- * A monad for step computations @@ -21,6 +24,13 @@ Done a >>= g = g a Tick f >>= g = Tick (f >>= g) +instance Applicative StepComp where+ pure = return+ (<*>) = ap++instance Functor StepComp where+ fmap = liftM+ instance Show a => Show (StepComp a) where show (Done a) = "Done(" ++ show a ++ ")" show (Tick c) = "Incomplete"
newsynth.cabal view
@@ -7,7 +7,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.2+version: 0.2.0.1 -- A short (one-line) description of the package. synopsis: Exact and approximate synthesis of quantum circuits@@ -85,7 +85,7 @@ -- other-modules: -- Other library packages from which modules are imported.- build-depends: base ==4.6.*, random ==1.0.*, fixedprec >= 0.2.2 && < 0.3, superdoc ==0.1.*, containers ==0.5.*+ build-depends: base >= 4.6 && < 4.8, random >= 1.0 && < 1.2, fixedprec >= 0.2.2 && < 0.3, superdoc ==0.1.*, containers ==0.5.* -- Additional options for GHC when the package is built with -- profiling enabled.@@ -102,4 +102,4 @@ other-modules: CommandLine -- Other library packages from which modules are imported.- build-depends: base ==4.6.*, random ==1.0.*, time ==1.4.*, superdoc ==0.1.*, newsynth+ build-depends: base >= 4.6 && < 4.8, random >= 1.0 && < 1.2, time ==1.4.*, superdoc ==0.1.*, newsynth
programs/gridsynth.hs view
@@ -220,7 +220,7 @@ when (opt_stats options) $ do putStrLn ("Random seed: " ++ show g) putStrLn ("T-count: " ++ show tcount)- putStrLn ("Lower bound on T-count: " ++ show tcount)+ putStrLn ("Lower bound on T-count: " ++ show tlower) putStrLn ("Theta: " ++ showf l theta) putStrLn ("Epsilon: " ++ showf_exp l 10 exponent (Just digits)) putStrLn ("Matrix: " ++ showf l m)