-
Notifications
You must be signed in to change notification settings - Fork 983
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
Removing GateSpecification.valid_targets and deprecating some target types #5376
Merged
CirqBot
merged 5 commits into
quantumlib:master
from
verult:cg-device-refactor/deprecate-proto
Jun 1, 2022
Merged
Removing GateSpecification.valid_targets and deprecating some target types #5376
CirqBot
merged 5 commits into
quantumlib:master
from
verult:cg-device-refactor/deprecate-proto
Jun 1, 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
… which are no longer necessary. The original DeviceSpecification was designed to be somewhat future-proof, so it contains fields which do not pertain to hardware at the time. Some assumptions remain overly general for our hardware today and in the near future. Specifically, we can make the following assumptions about our devices: * All valid qubit pairs work for all two-qubit gates. * All valid qubits work for all single-qubit gates. * Measurement gate can always be applied to all subset of qubits. Based on these assumptions, SUBSET_PERMUTATION target type and the newly introduced `GateSpecification.valid_targets` are no longer necessary. This change also removes the unused ASYMMETRIC target type.
verult
force-pushed
the
cg-device-refactor/deprecate-proto
branch
from
May 19, 2022 00:12
d9694c7
to
59afd41
Compare
dstrain115
reviewed
May 20, 2022
dstrain115
approved these changes
Jun 1, 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, thanks for addressing comments.
verult
added
the
automerge
Tells CirqBot to sync and merge this PR. (If it's running.)
label
Jun 1, 2022
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
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
…types (quantumlib#5376) The original DeviceSpecification was designed to be somewhat future-proof, so it contains fields which do not pertain to hardware at the time. Some assumptions remain overly general for our hardware today and in the near future. Specifically, we can make the following assumptions about our devices: * All valid qubit pairs work for all two-qubit gates. * All valid qubits work for all single-qubit gates. * Measurement gate can always be applied to all subset of qubits. Based on these assumptions, `SUBSET_PERMUTATION` target type and the newly introduced `GateSpecification.valid_targets` are no longer necessary. This change also removes the unused ASYMMETRIC target type. As device requirements change, new fields can be added in the future and existing fields deprecated, and this can be done in a backward-compatible way as long as the server fills both deprecated and new fields until deprecated fields are removed. This provides the flexibility to keep our proto surface small, which makes serialization/deserialization logic simpler to maintain. **Notes for reviewers**: * `GateSpecification` was recently introduced and has never been sent over the wires, so it's OK to change its fields directly. * The description of assumptions about 1q, 2q, and measurement targets are moved to the proto. * The proto can be made simpler by replacing `TargetSet` with a less general `qubit_pairs`, which is sufficient to satisfy the requirements today. I would prefer this route as we have the flexibility to generalize later on if we'd like. WDYT? @dstrain115 @maffoo
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.
The original DeviceSpecification was designed to be somewhat future-proof, so it contains fields which do not pertain to hardware at the time. Some assumptions remain overly general for our hardware today and in the near future. Specifically, we can make the following assumptions about our devices:
Based on these assumptions,
SUBSET_PERMUTATION
target type and the newly introducedGateSpecification.valid_targets
are no longer necessary.This change also removes the unused ASYMMETRIC target type.
As device requirements change, new fields can be added in the future and existing fields deprecated, and this can be done in a backward-compatible way as long as the server fills both deprecated and new fields until deprecated fields are removed. This provides the flexibility to keep our proto surface small, which makes serialization/deserialization logic simpler to maintain.
Notes for reviewers:
GateSpecification
was recently introduced and has never been sent over the wires, so it's OK to change its fields directly.TargetSet
with a less generalqubit_pairs
, which is sufficient to satisfy the requirements today. I would prefer this route as we have the flexibility to generalize later on if we'd like. WDYT?@dstrain115 @maffoo