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

Fix type hint on find_basic_approximation in SolovayKitaevDecomposition #12627

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

cstiago
Copy link
Contributor

@cstiago cstiago commented Jun 21, 2024

Summary

The return type hint of find_basic_approximation method changes from Gate to GateSequence in SolovayKitaevDecomposition class, as implied by self.basic_approximations.

With no remaining mentions of Gate, its corresponding import statement is removed.

Details and comments

Fixes #12559.

The return type hint of `find_basic_approximation` method changes from `Gate` to `GateSequence` in `SolovayKitaevDecomposition` class, as implied by `self.basic_approximations`.

With no remaining mentions of `Gate`, its corresponding import statement is removed.
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Jun 21, 2024
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

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

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented Jun 21, 2024

Pull Request Test Coverage Report for Build 9610004302

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 22 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.02%) to 89.723%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 4 92.37%
crates/qasm2/src/parse.rs 18 96.69%
Totals Coverage Status
Change from base Build 9602245093: -0.02%
Covered Lines: 63560
Relevant Lines: 70840

💛 - Coveralls

@ElePT ElePT added documentation Something is not clear or an error documentation Changelog: None Do not include in changelog labels Jun 21, 2024
Copy link
Contributor

@ElePT ElePT left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution, the fix looks good. I think we should also backport it to previous versions.

@ElePT ElePT added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Jun 21, 2024
@ElePT ElePT enabled auto-merge June 21, 2024 11:06
@ElePT
Copy link
Contributor

ElePT commented Jun 21, 2024

https://github.com/Mergifyio backport stable/0.46 stable/1.1

Copy link
Contributor

mergify bot commented Jun 21, 2024

backport stable/0.46 stable/1.1

✅ Backports have been created

@ElePT ElePT added this pull request to the merge queue Jun 21, 2024
Merged via the queue into Qiskit:main with commit 91f0c70 Jun 21, 2024
15 checks passed
mergify bot pushed a commit that referenced this pull request Jun 21, 2024
The return type hint of `find_basic_approximation` method changes from `Gate` to `GateSequence` in `SolovayKitaevDecomposition` class, as implied by `self.basic_approximations`.

With no remaining mentions of `Gate`, its corresponding import statement is removed.

(cherry picked from commit 91f0c70)
mergify bot pushed a commit that referenced this pull request Jun 21, 2024
The return type hint of `find_basic_approximation` method changes from `Gate` to `GateSequence` in `SolovayKitaevDecomposition` class, as implied by `self.basic_approximations`.

With no remaining mentions of `Gate`, its corresponding import statement is removed.

(cherry picked from commit 91f0c70)
github-merge-queue bot pushed a commit that referenced this pull request Jun 21, 2024
The return type hint of `find_basic_approximation` method changes from `Gate` to `GateSequence` in `SolovayKitaevDecomposition` class, as implied by `self.basic_approximations`.

With no remaining mentions of `Gate`, its corresponding import statement is removed.

(cherry picked from commit 91f0c70)

Co-authored-by: Tiago R. Cunha <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Jun 21, 2024
The return type hint of `find_basic_approximation` method changes from `Gate` to `GateSequence` in `SolovayKitaevDecomposition` class, as implied by `self.basic_approximations`.

With no remaining mentions of `Gate`, its corresponding import statement is removed.

(cherry picked from commit 91f0c70)

Co-authored-by: Tiago R. Cunha <[email protected]>
@cstiago cstiago changed the title Fix type hint in SolovayKitaevDecomposition Fix type hint on find_basic_approximation in SolovayKitaevDecomposition Jun 22, 2024
@cstiago cstiago deleted the fix-type-hint-solovay-kitaev branch June 22, 2024 15:00
Procatv pushed a commit to Procatv/qiskit-terra-catherines that referenced this pull request Aug 1, 2024
The return type hint of `find_basic_approximation` method changes from `Gate` to `GateSequence` in `SolovayKitaevDecomposition` class, as implied by `self.basic_approximations`.

With no remaining mentions of `Gate`, its corresponding import statement is removed.
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 Community PR PRs from contributors that are not 'members' of the Qiskit repo documentation Something is not clear or an error documentation stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Incorrect type hints on find_basic_approximations in SolovayKitaevDecomposition
4 participants