Skip to content
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 deprecated stochastic swap transpiler pass #13791

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mtreinish
Copy link
Member

Summary

This commit removes the stochastic swap transpiler pass and its associated routing stage plugin. This pass has been superseded by sabre at this point and it was deprecated in the Qiskit 1.3.0 release.

Details and comments

Part of #13699

This commit removes the stochastic swap transpiler pass and its
associated routing stage plugin. This pass has been superseded by sabre
at this point and it was deprecated in the Qiskit 1.3.0 release.

Part of Qiskit#13699
@mtreinish mtreinish requested a review from a team as a code owner February 5, 2025 17:57
@qiskit-bot
Copy link
Collaborator

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

  • @Qiskit/terra-core

@mtreinish mtreinish added the Changelog: Removal Include in the Removed section of the changelog label Feb 5, 2025
@mtreinish mtreinish added this to the 2.0.0 milestone Feb 5, 2025
@mtreinish mtreinish added the mod: transpiler Issues and PRs related to Transpiler label Feb 5, 2025
@coveralls
Copy link

coveralls commented Feb 5, 2025

Pull Request Test Coverage Report for Build 13168305596

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.
  • 562 unchanged lines in 17 files lost coverage.
  • Overall coverage decreased (-0.05%) to 88.614%

Files with Coverage Reduction New Missed Lines %
crates/accelerate/src/gate_direction.rs 1 97.34%
qiskit/transpiler/passes/layout/dense_layout.py 1 80.0%
crates/accelerate/src/twirling.rs 1 97.62%
crates/accelerate/src/barrier_before_final_measurement.rs 1 98.36%
qiskit/transpiler/preset_passmanagers/builtin_plugins.py 1 95.41%
qiskit/transpiler/preset_passmanagers/plugin.py 1 98.33%
crates/accelerate/src/circuit_library/pauli_evolution.rs 4 97.94%
crates/qasm2/src/lex.rs 4 92.48%
qiskit/circuit/delay.py 6 75.0%
crates/qasm2/src/parse.rs 6 97.15%
Totals Coverage Status
Change from base Build 13160043282: -0.05%
Covered Lines: 78763
Relevant Lines: 88883

💛 - Coveralls

Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

o7 to the first Rust code of Qiskit

target=backend.target
)

this should be replaced with::
Copy link
Member

Choose a reason for hiding this comment

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

Need to unindent this text line to separate the code blocks.

Comment on lines 108 to 110
with warnings.catch_warnings():
# TODO: remove this filter when StochasticSwap is removed
warnings.filterwarnings(
"ignore",
category=DeprecationWarning,
message=r".*StochasticSwap.*",
)
# pylint: disable=not-callable
passmanager.append(self.pass_class(CouplingMap(coupling_map), **self.additional_args))
Copy link
Member

Choose a reason for hiding this comment

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

Can remove the whole warnings.catch_warnings now too

Comment on lines 309 to 311
with self.assertWarns(DeprecationWarning):
pass_ = SabreLayout(
cm, seed=0, routing_pass=StochasticSwap(cm, trials=1, seed=0, fake_run=True)
)
pass_ = SabreLayout(cm, seed=0, routing_pass=BasicSwap(cm, fake_run=True))
_ = pass_(qc)
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't warn now... I think it might be the duration thing inside the implicit dag_to_circuit from SabreLayout.__call__.

@jakelishman
Copy link
Member

Oh also I meant to write in the top review comment: we need to update the qiskit.transpiler and qiskit.transpiler.preset_passmanager.plugin docstrings to remove the reference to the stochastic plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Removal Include in the Removed section of the changelog mod: transpiler Issues and PRs related to Transpiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants