Skip to content

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

Merged
merged 8 commits into from
Jun 1, 2022

Conversation

MichaelBroughton
Copy link
Collaborator

Fixes broken docstring for from_diagram on gridqubit page.

@MichaelBroughton MichaelBroughton requested review from a team, vtomole and cduck as code owners April 28, 2022 23:25
@CirqBot CirqBot added the size: S 10< lines changed <50 label Apr 28, 2022
---A---
--AAA--
-AAAAA-
AAAAAAA
```

You can use any character other than a hyphen to mark a qid. As an
Copy link
Collaborator

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.


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
Copy link
Collaborator

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.

@95-martin-orion 95-martin-orion added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jun 1, 2022
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jun 1, 2022
@CirqBot CirqBot merged commit 6de1a3f into quantumlib:master Jun 1, 2022
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Jun 1, 2022
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
Fixes broken docstring for `from_diagram` on gridqubit page.
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
Fixes broken docstring for `from_diagram` on gridqubit page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants