-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug in ptranspose and added corresponding tests #98
Conversation
corrected bug in ptranspose and added support for multi-index subsystem in addition to the single-index method.
replaced tests for single-index ptranspose matching the corrected version; added tests for multi-index version of ptranspose
add type specification for `index::Int` argument
fix typo in code
Codecov Report
@@ Coverage Diff @@
## master #98 +/- ##
==========================================
- Coverage 96.65% 93.03% -3.63%
==========================================
Files 26 24 -2
Lines 3410 3159 -251
==========================================
- Hits 3296 2939 -357
- Misses 114 220 +106
... and 25 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
add back original tests for ptranspose to keep code coverage
@zejian-li Thanks for this! It looks fine, I just have one small question: any reason you added another dispatch for |
@david-pl yes you are right! I will change the signature back to |
removing typing for second argument of `ptranspose` function
update docstring of ptranspose to be more general
Should be good now. The negativity functions will also support now multiple indices without modification. |
fixed bug reported in #97
the
ptranspose(rho::DenseOpType{B,B}, indices::Union{Vector{Int},Tuple{Vararg{Int}}})
method is added to support multi-index subsystems, and the original single-index methodptranspose(rho::DenseOpType{B,B}, index::Int=1)
is kept for compatibility, but implemented as a special case using the multi-index version.tests dedicated to the two methods are added.