Restore approx 0 rounding to decomp0 method #4862
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
In #4656 we added rounding to the output of the decomp0 method to handle
a case where differing FP precision on windows environments was causing
an expected result in running two_qubit_cnot_decompose on np.eye(4)
with numpy 1.19.x installed leading to a hard failure in the qasm tests.
This seemed to reliably unblock testing and make unit tests work
reliably. However, that original fix from #4656 was superseded by #4835
which was a fix for a more general issue with the reproducibility of the
decompositions and reverted. Since #4835 has merged we've been seeing an
uptick in the failure rate on the same unitary qasm test that #4656
fixed, so the change in #4835 was not actually sufficient for the
windows case. This commit restores the fix from #4656 to unblock CI and
fix the reproducability of the decompositions across systems.
Details and comments
Fixes #4856