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

Allow creating device proto for specified qubits and pairs #2934

Merged
merged 6 commits into from
Apr 24, 2020

Conversation

maffoo
Copy link
Contributor

@maffoo maffoo commented Apr 23, 2020

Currently cirq.google.devices.known_devices.create_device_proto_from_diagram allows creating a DeviceDescription proto message from an ascii-art depiction of a grid of qubits; the function assumes that all adjacent qubits in the grid are coupled. We refactor this to introduce a new function create_device_proto_for_qubits which allows directly specifying the qubits and coupled pairs in a device. This could be useful for other device connectivity, for example irregular grids where some adjacent are not coupled.

@googlebot googlebot added the cla: yes Makes googlebot stop complaining. label Apr 23, 2020
cirq/google/devices/known_devices.py Outdated Show resolved Hide resolved
cirq/google/devices/known_devices.py Outdated Show resolved Hide resolved
cirq/google/devices/known_devices.py Outdated Show resolved Hide resolved
cirq/google/devices/known_devices.py Outdated Show resolved Hide resolved
@maffoo maffoo requested a review from viathor April 23, 2020 20:21
Copy link
Collaborator

@dstrain115 dstrain115 left a comment

Choose a reason for hiding this comment

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

Can you add more to the PR description? It's currently blank.

cirq/google/devices/known_devices.py Outdated Show resolved Hide resolved
@maffoo maffoo merged commit 06f34f8 into master Apr 24, 2020
@maffoo maffoo deleted the u/maffoo/device-proto branch April 24, 2020 04:28
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants