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: Improve gphase unitary matrix definition in docstring #944

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

rmshaffer
Copy link
Contributor

@rmshaffer rmshaffer commented Apr 9, 2024

Issue #, if available:
LaTeX rendering is incorrect for gphase unitary matrix definition.

see: https://amazon-braket-sdk-python.readthedocs.io/en/latest/_apidoc/braket.circuits.gates.html#braket.circuits.gates.GPhase
image

Description of changes:
Fix LaTeX markup. Also add full matrix definition for consistency with other gates. With these changes, it looks like:
image

Testing done:
Validated rendered docs from PR output.

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.

@rmshaffer rmshaffer changed the title Improve gphase unitary matrix definition in docstring doc: Improve gphase unitary matrix definition in docstring Apr 9, 2024
Copy link

codecov bot commented Apr 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (64a2536) to head (a50ec4b).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #944   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          133       133           
  Lines         8909      8909           
  Branches      2008      2008           
=========================================
  Hits          8909      8909           

☔ 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 9, 2024 15:15
@rmshaffer rmshaffer requested a review from a team as a code owner April 9, 2024 15:15
@rmshaffer rmshaffer merged commit c687223 into main Apr 9, 2024
24 checks passed
@rmshaffer rmshaffer deleted the rmshaffer/gphase-docstring branch April 9, 2024 16:43
@speller26
Copy link
Member

Is it potentially misleading to depict the global phase as a 2*2 matrix?

@rmshaffer
Copy link
Contributor Author

rmshaffer commented Apr 10, 2024

Is it potentially misleading to depict the global phase as a 2*2 matrix?

Yes, not only misleading but completely wrong. Thanks for catching this, not sure why I did that. Opened #946 to fix it.

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.

3 participants