-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 fake backends based on BackendV1
and related tools
#13805
Conversation
Pull Request Test Coverage Report for Build 13587359090Warning: 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 |
ca5a45b
to
6c8d616
Compare
One or more of the following people are relevant to this code:
|
BackendV1
and related toolsBackendV1
and related tools
…y tests that checked V1 functionality, mitigators (independent removal). Update rest of unit tests to use GenericBackendV2
…d in 2.0 so no alternative is provided)
fc3c929
to
9cf239c
Compare
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.
Looks good overall. I've left some minor comments regarding a reno and some tests.
releasenotes/notes/remove-fake-v1-backends-b66bc47886702904.yaml
Outdated
Show resolved
Hide resolved
Co-authored-by: Eli Arbel <46826214+eliarbel@users.noreply.github.com>
…move non-relevant tests
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.
Thanks @ElePT for making all the changes. One last typo fix in the reno which I've missed in my previous review and we're done (better to address now rather than wait for the big reno review just before the release)
releasenotes/notes/remove-fake-v1-backends-b66bc47886702904.yaml
Outdated
Show resolved
Hide resolved
Co-authored-by: Eli Arbel <46826214+eliarbel@users.noreply.github.com>
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.
This LGTM. I had a few inline comments but nothing critical mostly idle musings as a I read through the code. There was one question about one test being added but it's not a blocker.
@@ -201,7 +201,7 @@ def transpile( # pylint: disable=too-many-return-statements | |||
If unit is omitted, the default is 'dt', which is a sample time depending on backend. | |||
If the time unit is 'dt', the duration must be an integer. | |||
dt: Backend sample time (resolution) in seconds. | |||
If ``None`` (default), ``backend.configuration().dt`` is used. | |||
If ``None`` (default), ``backend.dt`` is used. |
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.
This might have slipped in from the backendv1 removal pr. Not a big deal though
@@ -153,7 +154,8 @@ def setup(self, _): | |||
self.qasm_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "qasm")) | |||
large_qasm_path = os.path.join(self.qasm_path, "test_eoh_qasm.qasm") | |||
self.large_qasm = QuantumCircuit.from_qasm_file(large_qasm_path) | |||
self.melbourne = Fake20QV1() | |||
self.melbourne = GenericBackendV2(num_qubits=20, coupling_map=MELBOURNE_CMAP, seed=0) |
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.
Unfortunately this will invalidate the benchmarking results for these benchmarks. There's no helping it since we're removing the code they rely on. But I'm going to miss the data:
@@ -183,6 +186,20 @@ def test_example_swap_bits(self): | |||
).result() | |||
self.assertEqual(result.get_counts(qc), {"010000": 1024}) | |||
|
|||
def test_parallel_compile(self): |
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.
Did this test get lost? Also this won't trigger parallelism by default, we have a dedicated class that overrides the defaults to ensure we run under multiprocessing here: https://github.com/Qiskit/qiskit/blob/main/test/python/compiler/test_transpiler.py#L2628
But there is no harm in having this test.
def setUp(self): | ||
super().setUp() | ||
with self.assertWarns(DeprecationWarning): | ||
backend = FakeOpenPulse2Q() |
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 find it disappointing that we didn't have tests in this file that just built a BackendConfiguration
standalone. Not a comment on this PR, but more just a general comment. Removing these makes sense since we're removing BackendV1 after this, I was just surprised to see the file deleted here.
Summary
This PR branches off #13793 and contains the changes related to the fake backend removal. This PR is built on top of #13722 and currently BLOCKED by it.
Details and comments
TODOs: