Fix API docstring math and ASCII rendering - #8259
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
@tinakim522 It's unclear whether this account is an AI bot or a real person. In any case, the PR contents are incorrect: the changes use rST syntax, but this project does not use rST for docstrings. If you are a real person, please let us know here. |
|
Hi. I am a passionate contributor on this project. My name is Tina Kim and is very interested in quantum open source projects.
…________________________________
From: Michael Hucka ***@***.***>
Sent: Wednesday, August 5, 2026 8:19 PM
To: quantumlib/Cirq ***@***.***>
Cc: Tina Kim ***@***.***>; Mention ***@***.***>
Subject: Re: [quantumlib/Cirq] Fix API docstring math and ASCII rendering (PR #8259)
[https://avatars.githubusercontent.com/u/1450019?s=20&v=4]mhucka left a comment (quantumlib/Cirq#8259)<#8259 (comment)>
@tinakim522<https://github.com/tinakim522> It's unclear whether this account is an AI bot or a real person. In any case, the PR contents are incorrect: the changes use rST syntax, but this project does not use rST for docstrings.
If you are a real person, please let us know here.
—
Reply to this email directly, view it on GitHub<#8259?email_source=notifications&email_token=CKYGGFBPTAWMKRNPREIUHQT5IOJE7A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJZGY4DQNRQGA22M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5196886005>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/CKYGGFH46V6OM4MCCE2AJTT5IOJE7AVCNFSNUABFKJSXA33TNF2G64TZHMYTCNBTGA3DONJYHNEXG43VMU5TKMBXGQ4DCMZYG4Y2C5QC>.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS<https://github.com/notifications/mobile/ios/CKYGGFBCXCFAVSHSP7EZPET5IOJE7A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJZGY4DQNRQGA22M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y> and Android<https://github.com/notifications/mobile/android/CKYGGFDOLEKQXHCBU66M4E35IOJE7A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJZGY4DQNRQGA22M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>. Download it today!
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
d017797 to
15d86bc
Compare
|
Thanks for the feedback — you're right, Cirq uses Markdown-flavored Google-style docstrings, not rST. I pushed an update that:
Also still need to complete the Google CLA on my side. |
Replace nonstandard \ket with |j\rangle and display math for UniformSuperpositionGate, and indent the integrated_histogram ASCII sketch as a Markdown code block so it does not collapse in docs. Fixes quantumlib#8212 Fixes quantumlib#8211
15d86bc to
13cf009
Compare
|
Ah, good, a real person! Thanks for your reply and contribution. I'll do a review now. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8259 +/- ##
=======================================
Coverage 99.59% 99.59%
=======================================
Files 1120 1120
Lines 102249 102249
=======================================
Hits 101836 101836
Misses 413 413 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mhucka
left a comment
There was a problem hiding this comment.
A very small change request; otherwise, this looks good.
| r"""Creates a uniform superposition state on the states $[0, M)$. | ||
|
|
||
| The gate creates the state | ||
| $$\frac{1}{\sqrt{M}}\sum_{j=0}^{M-1}|j\rangle$$ |
There was a problem hiding this comment.
Math formulas inside $$ need to be put on separate lines to format reliably in the software that generates the docs.
| $$\frac{1}{\sqrt{M}}\sum_{j=0}^{M-1}|j\rangle$$ | |
| $$ | |
| \frac{1}{\sqrt{M}}\sum_{j=0}^{M-1}|j\rangle | |
| $$ |
|
Thanks for the review — updated: display math is now on separate lines, and the branch is synced with |
Please communicate in your own words without copy/pasting from an AI tool. |
|
@pavoljuhas. Here i am talking in my words. Any further issues found? |
Thank you. Please see the failing CLA check, we cannot accept PRs without it. Also, please update the PR description so it is consistent with commit messages in this repo. Specifically, please remove the |
|
Test notes:
|
|
@pavoljuhas updated the description and moved the test notes to a separate comment. working on the CLA now. |

Replace nonstandard
\ketwith|j\rangleso the UniformSuperpositionGate formula renders correctly, and indent the integrated_histogram ASCII sketch as a Markdown code block so it does not collapse to one line in the docs.Fixes #8212
Fixes #8211