newsynth 0.3.0.3 → 0.3.0.4
raw patch · 6 files changed
+25/−11 lines, 6 filesdep −superdoc
Dependencies removed: superdoc
Files
- ChangeLog +6/−0
- Quantum/Synthesis/Clifford.hs +1/−0
- Quantum/Synthesis/Diophantine.hs +1/−0
- Quantum/Synthesis/GridSynth.hs +7/−6
- Quantum/Synthesis/SymReal.hs +1/−1
- newsynth.cabal +9/−4
ChangeLog view
@@ -1,5 +1,11 @@ ChangeLog +v0.3.0.4 2018/11/05+ (2018/11/05) PS1 - fixed some optional compiler warnings.+ (2018/11/05) PS1 - cabal: moved superdoc to setup-depends.+ (2018/11/05) PS1 - disabled simplifiable-class-constraints+ compiler warning.+ v0.3.0.3 2016/07/27 (2016/07/27) PS1 - relaxed package dependencies to accommodate older versions of ghc and base.
Quantum/Synthesis/Clifford.hs view
@@ -296,6 +296,7 @@ -- | 'tconj2' /a/ /b/ returns (/K/, /c/, /d/) such that -- -- * /E/[sup /a/]/X/[sup /b/]/T/ = /K//T//X/[sup /b/]/S/[sup /c/]ω[sup /d/].+tconj :: Int -> Int -> (Axis, Int, Int) tconj 0 0 = (Axis_I, 0, 0) tconj 0 1 = (Axis_I, 1, 7) tconj 1 0 = (Axis_H, 3, 3)
Quantum/Synthesis/Diophantine.hs view
@@ -267,6 +267,7 @@ -- prime divisor that occurs as an odd power and is congruent to 7 -- mod n. return Nothing+ | otherwise = error "dioph_int_assoc_prime" where n_mod_4 = n `mod` 4 n_mod_8 = n `mod` 8
Quantum/Synthesis/GridSynth.hs view
@@ -26,7 +26,6 @@ import System.Random import Data.Function-import Data.Number.FixedPrec -- ---------------------------------------------------------------------- -- * Approximate synthesis@@ -239,7 +238,9 @@ err = sqrt (real (hs_sqnorm (uU_fixed - zrot_fixed)) / 2) uU_fixed = matrix_map fromDOmega uU zrot_fixed = zrot (theta :: r)- ++data Phase = Phase0 | Phase1+ -- | The internal implementation of the ellipse-based approximate -- synthesis algorithm, up to a phase. The parameters are the same as -- for 'gridsynth_internal'.@@ -253,9 +254,9 @@ opG = to_upright_sets region0 disk0 raw_candidates0 = gridpoints2_increasing_with_gridop region0 disk0 opG raw_candidates1 = gridpoints2_increasing_with_gridop region1 disk1 opG- candidates0 = [ (t, 0, us) | (k, us) <- raw_candidates0,+ candidates0 = [ (t, Phase0, us) | (k, us) <- raw_candidates0, let t = tcount k ]- candidates1 = [ (t, 1, us') | (k, us) <- raw_candidates1,+ candidates1 = [ (t, Phase1, us') | (k, us) <- raw_candidates1, let t = 1 + tcount k, let us' = [ u * delta_inv | u <- us ] ] merged = mergeBy (compare `on` first) candidates0 candidates1@@ -278,7 +279,7 @@ xi = real (1 - adj u * u) answer_t = run_bounded effort $ diophantine_dyadic g1 xi - with_successful_candidate u t 0 = (uU, log_err) where+ with_successful_candidate u t Phase0 = (uU, log_err) where uU | denomexp (u + t) < denomexp (u + omega * t) = matrix2x2 (u, -(adj t)) (t, adj u) | otherwise@@ -290,7 +291,7 @@ uU_fixed = matrix_map fromDOmega uU zrot_fixed = zrot (theta :: r) - with_successful_candidate u t 1 = (uU, log_err) where+ with_successful_candidate u t Phase1 = (uU, log_err) where uU | denomexp (u + t) < denomexp (u + omega * t) = matrix2x2 (u, -(adj t) * omega_inv) (t, adj u * omega_inv) | otherwise
Quantum/Synthesis/SymReal.hs view
@@ -11,7 +11,7 @@ import Quantum.Synthesis.ArcTan2 import Control.Monad-import Data.Char (isAlpha, isAlphaNum, isDigit)+import Data.Char (isDigit) import Data.Number.FixedPrec import Text.ParserCombinators.ReadP import Data.Ratio
newsynth.cabal view
@@ -7,7 +7,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.3.0.3+version: 0.3.0.4 -- A short (one-line) description of the package. synopsis: Exact and approximate synthesis of quantum circuits@@ -60,7 +60,7 @@ maintainer: selinger@mathstat.dal.ca -- A copyright notice.-copyright: Copyright (c) 2012-2016 Neil J. Ross and Peter Selinger+copyright: Copyright (c) 2012-2018 Neil J. Ross and Peter Selinger -- A classification category for future use by the package catalogue -- Hackage. These categories have not yet been specified, but the@@ -85,12 +85,14 @@ -- other-modules: -- Other library packages from which modules are imported.- build-depends: base >= 4.5 && < 5, random >= 1.0, fixedprec >= 0.2.2, superdoc >= 0.1, containers >= 0.5+ build-depends: base >= 4.5 && < 5, random >= 1.0, fixedprec >= 0.2.2, containers >= 0.5 -- Additional options for GHC when the package is built with -- profiling enabled. ghc-prof-options: + ghc-options: -fno-warn-simplifiable-class-constraints+ executable gridsynth -- .hs or .lhs file containing the Main module. main-is: gridsynth.hs@@ -102,4 +104,7 @@ other-modules: CommandLine -- Other library packages from which modules are imported.- build-depends: base >= 4.5 && < 5, random >= 1.0, time >= 1.4, superdoc >= 0.1, newsynth+ build-depends: base >= 4.5 && < 5, random >= 1.0, time >= 1.4, newsynth++custom-setup+ setup-depends: base >= 4.5, superdoc >= 0.1