QuantumBFS / Yao.jl

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

fix type stability #424

Closed Roger-luo closed 1 year ago

Roger-luo commented 1 year ago

MWE:

before

julia> using YaoBlocks, BitBasis
[ Info: Precompiling YaoBlocks [418bc28f-b43b-5e0b-a6e7-61bbc1a2c1df]

julia> YaoBlocks.unsafe_getcol(ComplexF64, put(5, 1=>ConstGate.P1), bit"00000")
(Any[], ComplexF64[])

after

julia> using YaoBlocks, BitBasis

julia> YaoBlocks.unsafe_getcol(ComplexF64, put(5, 1=>ConstGate.P1), bit"00000")
(DitStr{2, 5, Int64}[], ComplexF64[])
codecov[bot] commented 1 year ago

Codecov Report

Merging #424 (73385ea) into master (3786145) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #424   +/-   ##
=======================================
  Coverage   88.30%   88.31%           
=======================================
  Files          76       76           
  Lines        4763     4765    +2     
=======================================
+ Hits         4206     4208    +2     
  Misses        557      557           
Impacted Files Coverage Δ
lib/YaoBlocks/src/routines.jl 95.61% <100.00%> (+0.02%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.