qojulia / QuantumOpticsBase.jl

Base functionality library for QuantumOptics.jl
Other
64 stars 34 forks source link

Fix sparse matrix exponential of zero since FastExpm doesn't handle it #136

Closed akirakyle closed 1 year ago

codecov[bot] commented 1 year ago

Codecov Report

Merging #136 (ed95634) into master (fe00cb9) will increase coverage by 0.01%. Report is 2 commits behind head on master. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   93.62%   93.63%   +0.01%     
==========================================
  Files          25       25              
  Lines        3105     3111       +6     
==========================================
+ Hits         2907     2913       +6     
  Misses        198      198              
Files Changed Coverage Δ
src/operators_lazytensor.jl 97.21% <100.00%> (ø)
src/operators_sparse.jl 98.36% <100.00%> (+0.05%) :arrow_up:
src/sparsematrix.jl 85.50% <100.00%> (ø)
src/states.jl 65.03% <100.00%> (ø)
src/superoperators.jl 83.06% <100.00%> (+0.56%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Krastanov commented 1 year ago

All tests pass, the coverage goes up, fixes a regression, and the code is straightforward. The only worry is that the function is not type stable anymore, but this seems like a situation where that is reasonable (an Eye matrix is a nicer result to deal with than a sparse matrix for downstream consumers).

Thank you for taking care of this!