Closed RyosukeNORO closed 1 month ago
@timmysilv, what do you suggest we do about codefactor here? We have a function with a lot of edge cases where the computation simplifies, so we'd like to leverage that, but now it is complaining about too many return statements.
@elib20 : for the complaint about too many returns you add #pylint ignore to tell it to shut up ;)
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
f935053
) to head (b5fbd06
).
Almost there @RyosukeNORO In the test that you added you need to add an extra line to trigger the lines where the order of the takagi values and unitaries are flipped. With that you should get full coverage.
Context: There were issues with Takagi decomposition, specifically sqrtm, with some matrix. For the previous discussion, please see (https://github.com/XanaduAI/thewalrus/pull/393)
Description of the Change: added the calculation method when the matrix to be takagi decomposed is diagonal. added the test code of the matrix for which the decomposition did not work well to test_decompositions.py.
Benefits: Takagi decomposition works well.
Possible Drawbacks:
Related GitHub Issues: (https://github.com/XanaduAI/thewalrus/pull/393)