-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix unexpected markdown syntax in docstring #7653
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 unexpected markdown syntax in docstring #7653
Conversation
In the docstring of apply, two exponentiation "**" accidentally combine to a bold text syntax. Use "^" instead as it's also being used in the rest of the documentation.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7653 +/- ##
==========================================
- Coverage 99.37% 99.37% -0.01%
==========================================
Files 1080 1080
Lines 96378 96378
==========================================
- Hits 95775 95774 -1
- Misses 603 604 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Please see the inline comment. Also, I found a few more places which show the same mix-up between the literal **
and a bold-face rendering in Cirq web docs.
Can you please fix these with double-backticks as well?
Cirq/cirq-core/cirq/ops/common_gates.py
Line 394 in 7673240
written as X**a Z**b for a,b=0,1,...,d-1. For a qubit, there is only one |
Cirq/cirq-core/cirq/ops/pauli_string_phasor.py
Lines 75 to 78 in 7673240
exponent_neg: How much to phase vectors in the negative eigenspace, | |
in the form of the t in (-1)**t = exp(i pi t). | |
exponent_pos: How much to phase vectors in the positive eigenspace, | |
in the form of the t in (-1)**t = exp(i pi t). |
Cirq/cirq-core/cirq/ops/pauli_string_phasor.py
Lines 295 to 298 in 7673240
exponent_neg: How much to phase vectors in the negative eigenspace, | |
in the form of the t in (-1)**t = exp(i pi t). | |
exponent_pos: How much to phase vectors in the positive eigenspace, | |
in the form of the t in (-1)**t = exp(i pi t). |
than the registers they will be stored into. The extra bits are | ||
simply dropped. For example, if the value 5 is returned for a 2 | ||
qubit register then 5 % 2**2 = 1 will be used instead. Negative | ||
qubit register then 5 % 2^2 = 1 will be used instead. Negative |
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.
Please use double backticks instead, ie, ``5 % 2**2 = 1``
, to avoid having **
interpreted as a bold-face markdown.
2^2
is a valid XOR expression which may confuse readers.
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.
Done, thanks for pointing this out!
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.
Thank you for fixing this!
I am updating the initial comment as it will become the merge commit message. In the docstring of ArithmeticGate.apply, two exponentiation ![]() Note that my first attempt is to make it an inline latex expression, however the spacing of |
In the docstring of ArithmeticGate.apply,
two exponentiation
**
accidentally combine to a bold text syntax.Here we add backtick quotes to avoid this, and also fix a few other
similar instances.