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 equality typos in Documentation for Ryy, Rxx and Rzx gates #13226

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

jofrevalles
Copy link
Contributor

Summary

This PR resolves #13225 by fixing the typos in the documentation for the Ryy, Rxx and Rzx gates.

Details and comments

If I am not mistaken, these are the proper equalities. I also checked the result with numpy:

>>> import qiskit
>>> import numpy as np
>>> Ryy = qiskit.circuit.library.standard_gates.RYYGate(theta=np.pi)
>>> np.isclose(np.array(Ryy), -1j*np.kron(np.array(Y), np.array(Y)))
array([[ True,  True,  True,  True],
       [ True,  True,  True,  True],
       [ True,  True,  True,  True],
       [ True,  True,  True,  True]])
>>> Rxx = qiskit.circuit.library.standard_gates.RXXGate(theta=np.pi)
>>> np.isclose(np.array(Rxx), -1j*np.kron(np.array(X), np.array(X)))
array([[ True,  True,  True,  True],
       [ True,  True,  True,  True],
       [ True,  True,  True,  True],
       [ True,  True,  True,  True]])
>>> Rzx = qiskit.circuit.library.standard_gates.RZXGate(theta=np.pi)
>>> np.isclose(np.array(Rzx), -1j*np.kron(np.array(X), np.array(Z)))
array([[ True,  True,  True,  True],
       [ True,  True,  True,  True],
       [ True,  True,  True,  True],
       [ True,  True,  True,  True]])

@jofrevalles jofrevalles requested a review from a team as a code owner September 26, 2024 15:20
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Sep 26, 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:

  • @Cryoris
  • @Qiskit/terra-core
  • @ajavadia

@CLAassistant
Copy link

CLAassistant commented Sep 26, 2024

CLA assistant check
All committers have signed the CLA.

@Cryoris
Copy link
Contributor

Cryoris commented Sep 27, 2024

Thanks for the PR @jofrevalles, the fix looks good! The test failures seem unrelated, that shouldn't be triggered by a change in the docstring.

To continue with the PR, could you sign the CLA in the message above? 🙂

@jofrevalles
Copy link
Contributor Author

Thanks for the PR @jofrevalles, the fix looks good! The test failures seem unrelated, that shouldn't be triggered by a change in the docstring.

To continue with the PR, could you sign the CLA in the message above? 🙂

Done! Thanks @Cryoris

@jakelishman jakelishman added 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 Changelog: None Do not include in changelog labels Sep 27, 2024
@jakelishman jakelishman added this to the 1.2.3 milestone Sep 27, 2024
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.

Thanks!

@jakelishman jakelishman added this pull request to the merge queue Sep 27, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11055286592

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 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 88.988%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 4 93.23%
Totals Coverage Status
Change from base Build 11052352075: 0.2%
Covered Lines: 55314
Relevant Lines: 62159

💛 - Coveralls

Merged via the queue into Qiskit:main with commit 1686815 Sep 27, 2024
15 checks passed
mergify bot pushed a commit that referenced this pull request Sep 27, 2024
(cherry picked from commit 1686815)
github-merge-queue bot pushed a commit that referenced this pull request Sep 27, 2024
(cherry picked from commit 1686815)

Co-authored-by: Jofre Vallès Muns <61060572+jofrevalles@users.noreply.github.com>
ElePT pushed a commit to ElePT/qiskit that referenced this pull request Oct 9, 2024
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 Equality in Documentation: Gate Ryy(θ=π) ≠ iY ⊗ Y
6 participants