-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix from_diagram docstring on GridQubit. #5307
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
Conversation
cirq-core/cirq/devices/grid_qubit.py
Outdated
---A--- | ||
--AAA-- | ||
-AAAAA- | ||
AAAAAAA | ||
``` | ||
|
||
You can use any character other than a hyphen to mark a qid. As an |
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 is incorrect, as noted in the "Args: diagram" section below. Periods and spaces are also treated as non-Qid positions, and non-alphanumeric characters produce an error.
cirq-core/cirq/devices/grid_qubit.py
Outdated
|
||
Args: | ||
diagram: String representing the qid layout. Each line represents | ||
a row. Alphanumeric characters are assigned as qid. | ||
Dots ('.'), dashes ('-'), and spaces (' ') are treated as | ||
Dots ('.'), dashes ('-'), and spaces are treated as |
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.
Why drop the (' ')
? I think it's helpful just for clarifying that we mean the "space" character, not whitespace in general.
Fixes broken docstring for `from_diagram` on gridqubit page.
Fixes broken docstring for `from_diagram` on gridqubit page.
Fixes broken docstring for
from_diagram
on gridqubit page.