-
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
Remove deprecated classes ConvertToIonGates and IonDevice #5696
Remove deprecated classes ConvertToIonGates and IonDevice #5696
Conversation
- meld _IonDeviceImpl into AQTDevice - meld _IonTargetGateset into AQTTargetGateset
Add TODO issue to fix the coverage later.
cirq-aqt/cirq_aqt/aqt_device.py
Outdated
class AQTTargetGateset(cirq.ion.ion_device._IonTargetGateset): | ||
pass | ||
|
||
class AQTTargetGateset(transformers.TwoQubitCompilationTargetGateset): |
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.
Can we add a docstring?
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.
Can we add a docstring?
@tanujkhattar - could you please help with this? (I think you are the original author of that class)
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.
added a suggestion, PTAL.
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.
added a suggestion, PTAL.
committed, thank you!
def decompose_circuit(self, circuit: circuits.Circuit) -> circuits.Circuit: | ||
return transformers.optimize_for_target_gateset(circuit, gateset=self.gateset) | ||
|
||
def duration_of(self, operation): |
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.
Didn't we move durations into metadata?
Maybe @MichaelBroughton can advise?
I think main device class is for validation and metadata is for "exploration" (i.e. understanding the topology of the device).
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.
These can be moved to metadata yes.
cirq-aqt/cirq_aqt/aqt_device.py
Outdated
q = devices.LineQubit(position) | ||
return q if q in self.qubits else None | ||
|
||
def neighbors_of(self, qubit: devices.LineQubit) -> Iterable[devices.LineQubit]: |
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.
This should likely move to metadata as well.
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.
These can be moved as well.
The |
Added reminder issue #5726. |
Co-authored-by: Tanuj Khattar <tanujkhattar@google.com>
@dstrain115 , @MichaelBroughton , @tanujkhattar - I feel this should be good to go, can one of you PTAL? |
AQTDevice is in a separate cirq_google package which can refer to cirq objects directly without worries of circular imports.
Automerge cancelled: A required status check is not present. Missing statuses: ['Misc check', 'Notebook formatting', 'Pytest MacOS (3.7)', 'Pytest MacOS (3.8)', 'Pytest MacOS (3.9)', 'Pytest Ubuntu (3.7)', 'Pytest Ubuntu (3.8)', 'Pytest Ubuntu (3.9)', 'Pytest Windows (3.7)', 'Pytest Windows (3.8)', 'Pytest Windows (3.9)', 'Type check', 'Typescript lint check', 'Typescript tests', 'Typescript tests coverage'] |
…#5696) Blend `_IonDeviceImpl` implementation superclass into AQTDevice. Also copy `ion_device_test` tests into `aqt_device_test`. Co-authored-by: Tanuj Khattar <tanujkhattar@google.com>
…#5696) Blend `_IonDeviceImpl` implementation superclass into AQTDevice. Also copy `ion_device_test` tests into `aqt_device_test`. Co-authored-by: Tanuj Khattar <tanujkhattar@google.com>
Blend
_IonDeviceImpl
implementation superclass into AQTDevice.Also copy
ion_device_test
tests intoaqt_device_test
.Co-authored-by: Tanuj Khattar tanujkhattar@google.com