Skip to content

Conversation

jakelishman
Copy link
Member

GenericBackendV2 defaults to explicit all-to-all connectivity. Many old test cases were somewhat mechanically changed to use GenericBackendV2 without fixing the coupling map, resulting in many tests using large-scale all-to-all connectivity with an inefficient representation, for tests that do not require it.

This commit changes all test-suite uses of GenericBackendV2 with more than 10 qubits and all-to-all connectivity to restrict the connectivity. There is one exception - a VF2Layout scaling test with 27q all-to-all, where the large number of possibilities is a deliberate part of the test.

Several tests that previously had BackendV1 and BackendV2 versions have one of the pair deleted, since BackendV1 no longer exists, and all those tests had already been changed to use BackendV2. A further regression test that was dependent on the particulars of various randomisation seeds that are long since out-of-date is also deleted, rather than blindly fixing its connectivity.

Summary

Details and comments

This finishes the job of #14483.

@jakelishman jakelishman requested a review from a team as a code owner May 28, 2025 12:06
@jakelishman jakelishman added type: qa Issues and PRs that relate to testing and code quality Changelog: None Do not include in changelog labels May 28, 2025
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core
  • @mtreinish
  • @nkanazawa1989

`GenericBackendV2` defaults to explicit all-to-all connectivity.  Many
old test cases were somewhat mechanically changed to use
`GenericBackendV2` without fixing the coupling map, resulting in many
tests using large-scale all-to-all connectivity with an inefficient
representation, for tests that do not require it.

This commit changes all test-suite uses of `GenericBackendV2` with more
than 10 qubits and all-to-all connectivity to restrict the connectivity.
There is one exception - a VF2Layout scaling test with 27q all-to-all,
where the large number of possibilities is a deliberate part of the
test.

Several tests that previously had `BackendV1` and `BackendV2` versions
have one of the pair deleted, since `BackendV1` no longer exists, and
all those tests had already been changed to use `BackendV2`.  A further
regression test that was dependent on the particulars of various
randomisation seeds that are _long_ since out-of-date is also deleted,
rather than blindly fixing its connectivity.
@coveralls
Copy link

coveralls commented May 28, 2025

Pull Request Test Coverage Report for Build 15309283798

Warning: 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

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 33 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.005%) to 87.825%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.23%
crates/qasm2/src/lex.rs 2 92.48%
qiskit/qpy/binary_io/value.py 30 77.74%
Totals Coverage Status
Change from base Build 15309125608: 0.005%
Covered Lines: 79533
Relevant Lines: 90558

💛 - Coveralls

if optimization_level == 3 and sys.platform == "win32":
self.skipTest(
"This test case triggers a bug in the eigensolver routine on windows. "
"See #10345 for more details."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh we should close this issue we're not using scipy or LAPACK for the weyl decomposition anymore. So if we have flakiness on Windows it's a different root cause and would warrant a new issue.

seed_transpiler=2023_07_26,
backend = GenericBackendV2(
num_qubits=27,
coupling_map=CouplingMap.from_line(27),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bit confusing at first, because the "v1" test had 16 qubits, while the v2 has 27. We're just running with the v2 version now which makes sense.

@mtreinish mtreinish added this pull request to the merge queue May 28, 2025
Merged via the queue into Qiskit:main with commit 6ea430c May 28, 2025
26 checks passed
@jakelishman jakelishman deleted the no-all-to-all branch May 28, 2025 21:36
rahaman-quantum pushed a commit to rahaman-quantum/qiskit that referenced this pull request Jun 20, 2025
`GenericBackendV2` defaults to explicit all-to-all connectivity.  Many
old test cases were somewhat mechanically changed to use
`GenericBackendV2` without fixing the coupling map, resulting in many
tests using large-scale all-to-all connectivity with an inefficient
representation, for tests that do not require it.

This commit changes all test-suite uses of `GenericBackendV2` with more
than 10 qubits and all-to-all connectivity to restrict the connectivity.
There is one exception - a VF2Layout scaling test with 27q all-to-all,
where the large number of possibilities is a deliberate part of the
test.

Several tests that previously had `BackendV1` and `BackendV2` versions
have one of the pair deleted, since `BackendV1` no longer exists, and
all those tests had already been changed to use `BackendV2`.  A further
regression test that was dependent on the particulars of various
randomisation seeds that are _long_ since out-of-date is also deleted,
rather than blindly fixing its connectivity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog type: qa Issues and PRs that relate to testing and code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants