QuantumBFS / YaoExtensions.jl

Useful extensions for Yao
Apache License 2.0
9 stars 3 forks source link

rename & add doc #18

Closed Roger-luo closed 4 years ago

Roger-luo commented 4 years ago
wangleiphy commented 4 years ago

Also need to update readme. It contains QFTCircuit(n): construct a quantum fourier transformation circuit.

Roger-luo commented 4 years ago

since reorder_firstdim is slower and not well maintained

with reorder_firstdim

julia> @benchmark apply!($(copy(reg)), block_iqft)
BenchmarkTools.Trial:
  memory estimate:  6.95 KiB
  allocs estimate:  75
  --------------
  minimum time:     7.748 μs (0.00% GC)
  median time:      8.948 μs (0.00% GC)
  mean time:        11.002 μs (4.54% GC)
  maximum time:     4.349 ms (39.70% GC)
  --------------
  samples:          10000
  evals/sample:     3

and using inplace reorder!

julia> @benchmark apply!($(copy(reg)), block_iqft)
BenchmarkTools.Trial:
  memory estimate:  4.03 KiB
  allocs estimate:  44
  --------------
  minimum time:     6.759 μs (0.00% GC)
  median time:      7.775 μs (0.00% GC)
  mean time:        9.375 μs (3.90% GC)
  maximum time:     4.170 ms (28.98% GC)
  --------------
  samples:          10000
  evals/sample:     4

I'll remove this and we should just use invorder!

codecov[bot] commented 4 years ago

Codecov Report

Merging #18 into master will increase coverage by 2.5%. The diff coverage is 59.67%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #18     +/-   ##
=========================================
+ Coverage    78.1%   80.61%   +2.5%     
=========================================
  Files          28       28             
  Lines         571      557     -14     
=========================================
+ Hits          446      449      +3     
+ Misses        125      108     -17
Impacted Files Coverage Δ
src/block_extension/reflect_gate.jl 100% <ø> (ø) :arrow_up:
src/diff_extension/stats.jl 88.46% <ø> (ø) :arrow_up:
src/diff_extension/kernel_mmd.jl 92% <ø> (ø) :arrow_up:
src/Miscellaneous.jl 0% <ø> (-38.89%) :arrow_down:
src/block_extension/math_gate.jl 94.73% <ø> (ø) :arrow_up:
src/YaoExtensions.jl 100% <ø> (ø) :arrow_up:
src/block_extension/FSimGate.jl 44.44% <0%> (ø) :arrow_up:
src/block_extension/TrivilGate.jl 62.5% <0%> (ø) :arrow_up:
src/block_extension/sequence.jl 52.63% <0%> (ø) :arrow_up:
src/block_extension/Mod.jl 88.88% <100%> (ø) :arrow_up:
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ebeca79...89c71cf. Read the comment docs.