-
Notifications
You must be signed in to change notification settings - Fork 121
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
@@ -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}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the backslashes in this section are incorrectly getting formatted:
https://github.com/amazon-braket/amazon-braket-sdk-python/pull/946/files#diff-85b1f0c3121c7b89a6f7951f13b6ef494dca0216445ef035fe69ed30e054fdc2L293
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.