Skip to content

Remove unnecessary tearDown code#15406

Merged
mtreinish merged 1 commit into
Qiskit:mainfrom
jakelishman:remove-useless-teardown
Dec 2, 2025
Merged

Remove unnecessary tearDown code#15406
mtreinish merged 1 commit into
Qiskit:mainfrom
jakelishman:remove-useless-teardown

Conversation

@jakelishman
Copy link
Copy Markdown
Member

The _backends instance value on BasicProvider() is an instance value, so re-calculating it on each test return no longer has any effect. The corresponding value used to be a class attribute on BasicAer, but this was changed in #11422.

Summary

Details and comments

The `_backends` instance value on `BasicProvider()` is an instance
value, so re-calculating it on each test return no longer has any
effect.  The corresponding value _used_ to be a class attribute on
`BasicAer`, but this was changed in Qiskit#11422.
@jakelishman jakelishman requested a review from a team as a code owner December 1, 2025 18:24
@jakelishman jakelishman added type: qa Issues and PRs that relate to testing and code quality Changelog: None Do not include in the GitHub Release changelog. labels Dec 1, 2025
@qiskit-bot
Copy link
Copy Markdown
Collaborator

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

  • @Qiskit/terra-core

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 19833134767

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.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.01%) to 88.404%

Files with Coverage Reduction New Missed Lines %
crates/circuit/src/parameter/parameter_expression.rs 1 82.3%
crates/qasm2/src/lex.rs 3 92.54%
Totals Coverage Status
Change from base Build 19827713394: 0.01%
Covered Lines: 95754
Relevant Lines: 108314

💛 - Coveralls

Copy link
Copy Markdown
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

I feel like there was something with the fake providers in the need for this historically too (like the provider list was being modified at runtime by the fake provider listing somewhere. But regardless it seems safe to remove this now.

@mtreinish mtreinish added this pull request to the merge queue Dec 2, 2025
@jakelishman
Copy link
Copy Markdown
Member Author

Yeah, when this was the BasicAer singleton provider I think it may have had some effect, but now the provider instantiates new simulators per instance anyway.

Merged via the queue into Qiskit:main with commit 2cde493 Dec 2, 2025
25 checks passed
@jakelishman jakelishman deleted the remove-useless-teardown branch December 2, 2025 21:06
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 the GitHub Release 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