Skip to content

Commit dc1e7f7

Browse files
exclude pasqal targets from generic wrapping (#735)
1 parent 1bfca2e commit dc1e7f7

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

azure-quantum/azure/quantum/cirq/service.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ def targets(
9696
cirq_targets.append(target)
9797
continue
9898

99-
# Only apply the generic QIR fallback to targets that advertise a QIR
100-
# target profile. Providers like Pasqal use pulse-level input formats
101-
# (e.g. pasqal.pulser.v1) that are incompatible with QIR submission.
102-
# target_profile is None for non-QIR targets.
103-
if not status.target_profile:
99+
# Pasqal uses a pulse-level input format (pasqal.pulser.v1) that is
100+
# incompatible with QIR submission. All other public Azure Quantum
101+
# targets are assumed to be QIR-compatible.
102+
_NON_QIR_PROVIDERS = {"pasqal"}
103+
if str(pid).strip().lower() in _NON_QIR_PROVIDERS:
104104
continue
105105

106106
cirq_targets.append(

azure-quantum/azure/quantum/qiskit/provider.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ def backends(self, name=None, **kwargs):
143143
if (target_id, pid) in existing_pairs:
144144
continue
145145
status = status_by_target.get((target_id, pid))
146-
# Only create a generic QIR backend for targets that advertise a QIR
147-
# target profile. Providers like Pasqal use pulse-level input formats
148-
# (e.g. pasqal.pulser.v1) that are incompatible with QIR submission.
149-
# target_profile is None for non-QIR targets.
150-
if status is not None and not status.target_profile:
146+
# Pasqal uses a pulse-level input format (pasqal.pulser.v1) that is
147+
# incompatible with QIR submission. All other public Azure Quantum
148+
# targets are assumed to be QIR-compatible.
149+
_NON_QIR_PROVIDERS = {"pasqal"}
150+
if str(pid).strip().lower() in _NON_QIR_PROVIDERS:
151151
continue
152152
backend_list.append(
153153
AzureGenericQirBackend(

0 commit comments

Comments
 (0)