Skip to content

Fix Rigetti check for Aspen family device kind #6734

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

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cirq-rigetti/cirq_rigetti/aspen_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(self, isa: Union[InstructionSetArchitecture, Dict[str, Any]]) -> No
else:
self.isa = InstructionSetArchitecture.from_raw(json.dumps(isa))

if self.isa.architecture.family != Family.Aspen:
if not Family.is_aspen(self.isa.architecture.family):
raise UnsupportedRigettiQCSQuantumProcessor(
'this integration currently only supports Aspen devices, '
f'but client provided a {self.isa.architecture.family} device'
Expand Down
6 changes: 3 additions & 3 deletions cirq-rigetti/cirq_rigetti/aspen_device_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ def test_rigetti_qcs_aspen_device_repr(qcs_aspen8_isa: InstructionSetArchitectur
def test_rigetti_qcs_aspen_device_family_validation(qcs_aspen8_isa: InstructionSetArchitecture):
"""test RigettiQCSAspenDevice validates architecture family on initialization"""
non_aspen_isa = InstructionSetArchitecture.from_raw(qcs_aspen8_isa.json())
non_aspen_isa.architecture.family = Family.NONE
non_aspen_isa.architecture.family = Family.new_none()

assert (
non_aspen_isa.architecture.family == Family.Aspen
assert Family.is_aspen(
non_aspen_isa.architecture.family
), 'ISA family is read-only and should still be Aspen'


Expand Down
3 changes: 3 additions & 0 deletions cirq-rigetti/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
pyquil>=4.11.0,<5.0.0

# TODO - remove once pyquil requires qcs-sdk-python >= 0.20.1
qcs-sdk-python>=0.20.1