Small refactoring of unitary synthesis tests#13582
Conversation
|
One or more of the following people are relevant to this code:
|
| ) | ||
|
|
||
| @data(1, 2, 3) | ||
| def test_coupling_map_unequal_durations(self, opt): |
There was a problem hiding this comment.
I removed this test because we originally had it as the backend V1 version of test_coupling_unequal_duration_with_backendv2, it was then migrated to backend v2 and became essentially a duplicate of the other one.
Pull Request Test Coverage Report for Build 12687926263Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
ShellyGarion
left a comment
There was a problem hiding this comment.
LGTM. Thanks @ElePT for the tests refactoring, it's very helpful!
It's not part of this PR, but I would just like to point out that it seems that the XXDecomposer lines inside the unitary_synthesis transpiler pass are not being covered by any of the tests, see the coverage report:
https://coveralls.io/builds/71414685/source?filename=qiskit%2Ftranspiler%2Fpasses%2Fsynthesis%2Funitary_synthesis.py
Summary
This is a small refactoring PR that proposes splitting the
UnitarySynthesistest class into two separate classes, one for tests that follow thebasis_gatespath, which is still in Python, and one for thetargetpath, which is now in Rust. With the current interleaving of target and basis gates tests it's easy to oversee what is covered where, and I believe that as a result we have an improvable coverage of both the Python and RustUnitarySynthesiscode. This PR doesn't fix that but sets the stage for reviewing and adding new tests in an organized way as we work on PRs like #13568.Details and comments
As I was moving the tests I took the time to squash a few of them into one, as they often just varied in one parameter that could be handled by ddt.