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

Named topologies: support manual placement #4628

Merged
merged 4 commits into from
Nov 8, 2021

Conversation

mpharrigan
Copy link
Collaborator

  • Helper method to get mappings to gridqubits
  • Document how to manually place TiltedSquareLattice and LineTopology graphs onto a sample device
  • Let draw_placements accept tilted boolean like the other draw methods
  • added some missing docstrings and type annotations

image

@mpharrigan mpharrigan requested review from cduck, vtomole and a team as code owners November 4, 2021 20:15
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Nov 4, 2021
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@CirqBot CirqBot added the size: M 50< lines changed <250 label Nov 4, 2021
@MichaelBroughton MichaelBroughton self-assigned this Nov 4, 2021
Copy link
Collaborator

@MichaelBroughton MichaelBroughton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

):
"""Draw a visualization of placements from small_graph onto big_graph using Matplotlib.

The entire `big_graph` will be drawn with default blue colored nodes. `small_graph` nodes
and edges will be highlighted with a red color.

Args:
big_graph: A larger graph to draw with blue colored nodes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: parent graph ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that would be a breaking change and less clear of a name, imo

@mpharrigan mpharrigan added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Nov 8, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Nov 8, 2021
@CirqBot CirqBot merged commit 7c36cef into quantumlib:master Nov 8, 2021
@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 Nov 8, 2021
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
- Helper method to get mappings to gridqubits
- Document how to manually place TiltedSquareLattice and LineTopology graphs onto a sample device
- Let `draw_placements` accept `tilted` boolean like the other draw methods
- added some missing docstrings and type annotations

![image](https://user-images.githubusercontent.com/4967059/140413234-d21fe08b-ec9e-4b5c-81d9-3600b4884799.png)
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
- Helper method to get mappings to gridqubits
- Document how to manually place TiltedSquareLattice and LineTopology graphs onto a sample device
- Let `draw_placements` accept `tilted` boolean like the other draw methods
- added some missing docstrings and type annotations

![image](https://user-images.githubusercontent.com/4967059/140413234-d21fe08b-ec9e-4b5c-81d9-3600b4884799.png)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining. size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants