QuantumBFS / Yao.jl

Extensible, Efficient Quantum Algorithm Design for Humans.
https://yaoquantum.org
Other
934 stars 123 forks source link

most populated bit strings in an array register #356

Closed GiggleLiu closed 2 years ago

GiggleLiu commented 2 years ago
julia> reg = arrayreg(ComplexF64[0.0, 0.6, 0.8, 0.0])
ArrayReg{2, ComplexF64, Array...}
    active qudits: 2/2
    nlevel: 2

julia> most_populated(reg, 2)
2-element Vector{BitStr64{2}}:
 10 ₍₂₎
 01 ₍₂₎
codecov[bot] commented 2 years ago

Codecov Report

Merging #356 (26ce6a4) into master (f1975d5) will increase coverage by 0.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #356      +/-   ##
==========================================
+ Coverage   85.51%   85.55%   +0.03%     
==========================================
  Files          78       78              
  Lines        3784     3793       +9     
==========================================
+ Hits         3236     3245       +9     
  Misses        548      548              
Impacted Files Coverage Δ
lib/YaoBlocks/src/primitive/rotation_gate.jl 89.47% <ø> (ø)
lib/YaoArrayRegister/src/register.jl 99.01% <100.00%> (+0.04%) :arrow_up:
lib/YaoBlocks/src/autodiff/adjroutines.jl 49.09% <0.00%> (-3.64%) :arrow_down:
lib/YaoBlocks/src/routines.jl 95.89% <0.00%> (+1.36%) :arrow_up:

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 f1975d5...26ce6a4. Read the comment docs.

Roger-luo commented 2 years ago

populated seems a wrong word for this? It should be most possible?