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

Add equivlences of ECR, SX and SXdg gates to the equivalence library #9913

Merged
merged 5 commits into from
Apr 5, 2023

Conversation

ShellyGarion
Copy link
Member

Summary

close #9907
Add equivalences of to the equivalence library:

  • CX decomposed into ECR and 1-qubit Clifford gates
  • H decomposed into SX and S gates
  • H decomposed into SXdg and Sdg gates

Details and comments

@ShellyGarion ShellyGarion added the Changelog: Bugfix Include in the "Fixed" section of the changelog label Apr 5, 2023
@ShellyGarion ShellyGarion requested a review from a team as a code owner April 5, 2023 06:14
@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:

@ShellyGarion ShellyGarion added this to the 0.24.0 milestone Apr 5, 2023
@coveralls
Copy link

coveralls commented Apr 5, 2023

Pull Request Test Coverage Report for Build 4618694982

  • 15 of 15 (100.0%) changed or added relevant lines in 1 file are covered.
  • 305 unchanged lines in 43 files lost coverage.
  • Overall coverage increased (+0.009%) to 85.437%

Files with Coverage Reduction New Missed Lines %
crates/accelerate/src/vf2_layout.rs 1 86.44%
qiskit/algorithms/eigen_solvers/eigen_solver.py 1 97.78%
qiskit/algorithms/phase_estimators/hamiltonian_phase_estimation_result.py 1 96.43%
qiskit/algorithms/time_evolvers/variational/solvers/ode/abstract_ode_function.py 1 93.33%
qiskit/algorithms/amplitude_amplifiers/amplification_problem.py 2 85.14%
qiskit/algorithms/amplitude_estimators/ae.py 2 93.9%
qiskit/algorithms/aux_ops_evaluator.py 2 95.56%
qiskit/algorithms/gradients/finite_diff_estimator_gradient.py 2 93.42%
qiskit/algorithms/gradients/lin_comb_qgt.py 2 97.92%
qiskit/algorithms/time_evolvers/variational/solvers/ode/forward_euler_solver.py 2 85.71%
Totals Coverage Status
Change from base Build 4613200656: 0.009%
Covered Lines: 67653
Relevant Lines: 79185

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

This looks good to me (aside from a minor comment on the release ntoe), thanks Shelly. For posterity: the standard equivalence library is tested for consistency automatically in test/python/circuit/test_gate_definitions.py.

@ShellyGarion ShellyGarion added Changelog: New Feature Include in the "Added" section of the changelog and removed Changelog: Bugfix Include in the "Fixed" section of the changelog labels Apr 5, 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.

Super, thanks.

@jakelishman jakelishman added this pull request to the merge queue Apr 5, 2023
Merged via the queue into Qiskit:main with commit 2b3686f Apr 5, 2023
giacomoRanieri pushed a commit to giacomoRanieri/qiskit-terra that referenced this pull request Apr 16, 2023
…iskit#9913)

* add equivlences of ECR, SX and SXdg gates

* update circuit in test_cx_bell_to_ecr

* add release notes

* update release notes following review

* minor fix
king-p3nguin pushed a commit to king-p3nguin/qiskit-terra that referenced this pull request May 22, 2023
…iskit#9913)

* add equivlences of ECR, SX and SXdg gates

* update circuit in test_cx_bell_to_ecr

* add release notes

* update release notes following review

* minor fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clifford transpilation doesn't support basis gates with "sx" instead of "h", or "ecr" instead of "cx"
4 participants