-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Remove use of BackendProperties
(BackendV1) in UnitarySynthesis
pass
#13706
Conversation
Pull Request Test Coverage Report for Build 13198658824Details
💛 - Coveralls |
One or more of the following people are relevant to this code:
|
Marked as on hold to make sure I have a 1.4 deprecation ready before merging this PR. |
No longer on hold after #13719 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, I just have two small, non-logic-touching comments 🙂
This argument required a ``BackendProperties`` object, deprecated since qiskit 1.2, as it | ||
belonged to the deprecated BackendV1 workflow. Constraints such as gate error and durations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to mention that BackendProperties
is removed in this release?
This argument required a ``BackendProperties`` object, deprecated since qiskit 1.2, as it | |
belonged to the deprecated BackendV1 workflow. Constraints such as gate error and durations | |
This argument required a ``BackendProperties`` object, deprecated since Qiskit 1.2, as it | |
belonged to the deprecated ``BackendV1`` workflow. Constraints such as gate error and durations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote the reno before #13722, which completes the removal... it is a bit weird to have UnitarySynthesis singled out, so I am thinking... should we remove the reno alltogether?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to remove the reno, as the changes are already reflected in the reno of #13722. I will change the label to Changelog:None to make sure there are no issues with the release bot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, it should all be in a single reno to understand what's going on 👍
@@ -952,6 +849,88 @@ def test_determinism(self): | |||
for basis_gate in basis_gates: | |||
self.assertLessEqual(out.count_ops()[basis_gate], gate_counts[basis_gate]) | |||
|
|||
@combine(gate=["unitary", "swap"], natural_direction=[True, False]) | |||
def test_two_qubit_synthesis_to_directional_cx_target(self, gate, natural_direction): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we merge these tests with the target-free versions above by adding e.g. a third argument via_target=True/False
that then builds a Target or not inside? Then we could reduce the duplication 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but not all the tests have an equivalent on the other class, so the unification would take a bit of work. I think that would be out of scope for this PR.
LGTM (except of the failing tests that should be updated).
|
00bee06
to
6e2a4c2
Compare
Yeah I don't know why the tests started failing on CI, they all pass locally and on previous CI runs, the lines that are reported to fail don't exist so I think it must be a small glitch. I re-pushed things to trigger the tests again. |
@jakelishman helped me understand the mysterious source of the errors: the CI jobs don’t actually run on the PR |
Summary
This PR includes:
target
instead ofbasis_gates
, as the functionality they were testing was dependant of thebackend_props
input (deprecated)backend_props
argument fromUnitarySynthesis
, as it relied on the deprecatedBackendProperties
class. The argument itself was never deprecated, so it might be necessary to open a deprecation PR against 1.4.Note that this PR touches on code that is currently actively worked on in:
UnitarySynthesis
transpiler pass #13568UnitarySynthesis
path usingbasis_gates
#13704And there will be conflicts.
Details and comments
BackendProperties
(BackendV1) in transpiler pipeline #13722 and # OxidizeUnitarySynthesis
path usingbasis_gates
#13704