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 inverse of SdgGate in Solovay Kitaev #9635

Merged
merged 7 commits into from
Feb 22, 2023
Merged

Conversation

Cryoris
Copy link
Contributor

@Cryoris Cryoris commented Feb 22, 2023

Summary

Fixes #9585 and adds generate_basic_approximation to the API doc.

Details and comments

Due to a typo (sgd instead of sdg) the inverse of the SdgGate was not correctly identified, see #9585.

This also adds the generate_basic_approximation to the docs as this function must be used for basis gate sets different from the default. The PR also adds an example for this use case to the class docstring.

@Cryoris Cryoris added stable backport potential The bug might be minimal and/or import enough to be port to stable Changelog: Bugfix Include in the "Fixed" section of the changelog labels Feb 22, 2023
@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 the following people are requested to review this:

  • @Qiskit/terra-core

@Cryoris Cryoris mentioned this pull request Feb 22, 2023
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.

Minor stuff aside this looks good. Thanks for the quick fix!

test/python/transpiler/test_solovay_kitaev.py Outdated Show resolved Hide resolved
qiskit/synthesis/__init__.py Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Feb 22, 2023

Pull Request Test Coverage Report for Build 4245392985

  • 2 of 2 (100.0%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.001%) to 85.305%

Files with Coverage Reduction New Missed Lines %
qiskit/synthesis/discrete_basis/solovay_kitaev.py 1 83.1%
src/vf2_layout.rs 1 86.44%
Totals Coverage Status
Change from base Build 4245133069: -0.001%
Covered Lines: 67367
Relevant Lines: 78972

💛 - 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.

Nice, thanks!

@jakelishman jakelishman added this to the 0.23.2 milestone Feb 22, 2023
@mergify mergify bot merged commit e52207f into Qiskit:main Feb 22, 2023
mergify bot pushed a commit that referenced this pull request Feb 22, 2023
* Fix typo and add regression test

* add example and include basic_approx in API doc

* use assertTrue

* use `assertGreater`

* run black with the right version this time

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit e52207f)
mergify bot added a commit that referenced this pull request Feb 22, 2023
* Fix typo and add regression test

* add example and include basic_approx in API doc

* use assertTrue

* use `assertGreater`

* run black with the right version this time

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit e52207f)

Co-authored-by: Julien Gacon <gaconju@gmail.com>
Eric-Arellano pushed a commit to Eric-Arellano/qiskit-terra that referenced this pull request Feb 23, 2023
* Fix typo and add regression test

* add example and include basic_approx in API doc

* use assertTrue

* use `assertGreater`

* run black with the right version this time

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Solovay-Kitaev Sa
4 participants