-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Move Engine interfaces to GridDevice #5558
Merged
CirqBot
merged 3 commits into
quantumlib:master
from
verult:cg-device-refactor/reroute-getdevice
Jun 20, 2022
Merged
Move Engine interfaces to GridDevice #5558
CirqBot
merged 3 commits into
quantumlib:master
from
verult:cg-device-refactor/reroute-getdevice
Jun 20, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
verult
requested review from
wcourtney,
a team,
vtomole and
cduck
as code owners
June 18, 2022 22:07
verult
force-pushed
the
cg-device-refactor/reroute-getdevice
branch
from
June 20, 2022 01:50
77c1d75
to
1e68ce6
Compare
MichaelBroughton
approved these changes
Jun 20, 2022
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.
LGTM
MichaelBroughton
added
the
automerge
Tells CirqBot to sync and merge this PR. (If it's running.)
label
Jun 20, 2022
CirqBot
added
the
front_of_queue_automerge
CirqBot uses this label to indicate (and remember) what's being merged next.
label
Jun 20, 2022
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 20, 2022
CirqBot
pushed a commit
that referenced
this pull request
Jun 21, 2022
Moves the various device-related functions in `virtual_engine_processor.py` to GridDevice. This is blocking SerializableDevice deprecation (#5522) because library code cannot call the deprecated SerializableDevice. * Rerouted functions in `virtual_engine_processor.py` to `GridDevice` * Deprecated the `gate_sets` parameter in `virtual_engine_processor.py` * Move `create_device_from_processor_id()` to GridDevice. @95-martin-orion * Made the return type more general by changing it to `cirq.Device` to allow for new device implementations in the future. * Created copies of existing rainbow and weber DeviceSpecifications and changed them to match the new DeviceSpecification format. * This update needs to happen now because `create_noiseless_virtual_engine_from_templates()` is updated to return a `GridDevice`, and the templates (rainbow and weber DeviceSpecifications) need to contain data in the new format in order to parse into GridDevice properly. * There are no publicly available devices since weber, so I chose to repurpose the existing rainbow and weber information. This was done manually since these devices are no longer available. * Gateset and gate_duration information should match previous versions. In particular, they both include the CZ gate with no duration information. **Reviewer Note**: The first 3 commits are from another pending PR (#5558); please start with the commit "[Move virtual engine functions to GridDevice](2e9ef33)". Don't be discouraged by the line count :) other than the 3 borrowed commits, ~600 lines are from the two new DeviceSpecification messages. @mpharrigan cc @MichaelBroughton @dstrain115
rht
pushed a commit
to rht/Cirq
that referenced
this pull request
May 1, 2023
* Migrate the different `processor.get_device()` methods and `Engine.get_engine_device()` to GridDevice * Deprecate the `gate_sets` parameter in various `get_device()` methods, and remove `gate_sets` usages. A dedicated deprecation decorator was added in order to handle `gate_sets` parameter being passed in as a positional argument. Originally I had planned to do this after the 0.15 release, but because library code is not allowed to rely on deprecated code within tests, this is blocking SerializableDevice deprecation (quantumlib#5522). @dstrain115 @MichaelBroughton
rht
pushed a commit
to rht/Cirq
that referenced
this pull request
May 1, 2023
Moves the various device-related functions in `virtual_engine_processor.py` to GridDevice. This is blocking SerializableDevice deprecation (quantumlib#5522) because library code cannot call the deprecated SerializableDevice. * Rerouted functions in `virtual_engine_processor.py` to `GridDevice` * Deprecated the `gate_sets` parameter in `virtual_engine_processor.py` * Move `create_device_from_processor_id()` to GridDevice. @95-martin-orion * Made the return type more general by changing it to `cirq.Device` to allow for new device implementations in the future. * Created copies of existing rainbow and weber DeviceSpecifications and changed them to match the new DeviceSpecification format. * This update needs to happen now because `create_noiseless_virtual_engine_from_templates()` is updated to return a `GridDevice`, and the templates (rainbow and weber DeviceSpecifications) need to contain data in the new format in order to parse into GridDevice properly. * There are no publicly available devices since weber, so I chose to repurpose the existing rainbow and weber information. This was done manually since these devices are no longer available. * Gateset and gate_duration information should match previous versions. In particular, they both include the CZ gate with no duration information. **Reviewer Note**: The first 3 commits are from another pending PR (quantumlib#5558); please start with the commit "[Move virtual engine functions to GridDevice](quantumlib@2e9ef33)". Don't be discouraged by the line count :) other than the 3 borrowed commits, ~600 lines are from the two new DeviceSpecification messages. @mpharrigan cc @MichaelBroughton @dstrain115
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
processor.get_device()
methods andEngine.get_engine_device()
to GridDevicegate_sets
parameter in variousget_device()
methods, and removegate_sets
usages.A dedicated deprecation decorator was added in order to handle
gate_sets
parameter being passed in as a positional argument.Originally I had planned to do this after the 0.15 release, but because library code is not allowed to rely on deprecated code within tests, this is blocking SerializableDevice deprecation (#5522).
@dstrain115 @MichaelBroughton