bsc-quantic / Tenet.jl

Composable Tensor Network library in Julia
https://bsc-quantic.github.io/Tenet.jl/
Apache License 2.0
17 stars 1 forks source link

Add `MatrixProductOperator` type #35

Closed emapuljak closed 1 year ago

emapuljak commented 1 year ago

Creation of MatrixProductOperator and related tests.

codecov[bot] commented 1 year ago

Codecov Report

Merging #35 (3efa1df) into master (161e3cd) will increase coverage by 67.53%. The diff coverage is 94.79%.

@@             Coverage Diff             @@
##           master      #35       +/-   ##
===========================================
+ Coverage    0.48%   68.02%   +67.53%     
===========================================
  Files          11       12        +1     
  Lines         613      713      +100     
===========================================
+ Hits            3      485      +482     
+ Misses        610      228      -382     
Impacted Files Coverage Δ
src/Quantum.jl 54.25% <ø> (+54.25%) :arrow_up:
src/Tenet.jl 100.00% <ø> (ø)
src/MatrixProductOperator.jl 94.50% <94.50%> (ø)
src/Helpers.jl 91.66% <100.00%> (+91.66%) :arrow_up:

... and 7 files with indirect coverage changes

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

mofeing commented 1 year ago

I'm adding @jofrevalles as a code reviewer.

mofeing commented 1 year ago

@emapuljak you need to include the MatrixProductOperator_test.jl file in the runtests.jl file in order to run the tests.

mofeing commented 1 year ago

@emapuljak Now tests are correctly run and there seem to be some failing tests. Can you check them? https://github.com/bsc-quantic/Tenet.jl/actions/runs/4380186083/jobs/7666970481#step:7:404

mofeing commented 1 year ago

Great. Now tests run successfully. They only fail because of some method ambiguities that I'm gonna fix.

mofeing commented 1 year ago

@emapuljak add some tests to check that the norm is 1 for randomly generated MatrixProductOperator{Open} and I think it will be ready to merge. The following cases would be nice to check:

You can now change from draft PR to PR (click on the button "Ready for review" on the bottom).