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

doc: correct gphase matrix representation #946

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

rmshaffer
Copy link
Contributor

Issue #, if available:
Fixing a documentation mistake in #944.

Description of changes:
Represent global phase as a 1x1 matrix rather than 2x2.

Testing done:
Verifying rendered docs for PR.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

codecov bot commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (53aba5e) to head (5bc32d9).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #946   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          134       134           
  Lines         8911      8911           
  Branches      2007      2007           
=========================================
  Hits          8911      8911           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rmshaffer rmshaffer marked this pull request as ready for review April 10, 2024 16:31
@rmshaffer rmshaffer requested a review from a team as a code owner April 10, 2024 16:31
@@ -279,9 +278,8 @@ def gphase(

Unitary matrix:

.. math:: \mathtt{gphase}(\gamma) = e^{i \gamma} I = \begin{bmatrix}
e^{i \gamma} & 0 \\
0 & e^{i \gamma} \end{bmatrix}.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

This may be due to the comment block being r""". In that case, I think removing the \\ may work for the doc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, although this appears to be the case for every single gate in the module, not just this one.

@rmshaffer rmshaffer merged commit b1cd32d into main Apr 12, 2024
24 checks passed
@rmshaffer rmshaffer deleted the rmshaffer/gphase-matrix-doc branch April 12, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants