Skip to content

Commit b43d102

Browse files
authored
Switch QIR Target checking from allow list to deny list (microsoft#2058)
This change updates the logic we use to decide if a target supports QIR submission in the extension. Previously it was an allow list which required any new targets or providers to be explicitly added. Instead, this uses a deny list style so that new providers and targets are allowed to submit either base or adaptive without requiring updates to the QDK. Then we can coordinate with new partners on what targets should be lit up for which purposes.
1 parent 5a86a67 commit b43d102

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

vscode/src/azure/providerProperties.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ export function targetSupportQir(target: string) {
1313
// Note: Most of these should be dynamic at some point, with configuration coming
1414
// from the service, and able to be overridden by settings.
1515
return (
16-
target.startsWith("ionq") ||
17-
target.startsWith("quantinuum") ||
18-
target.startsWith("rigetti")
16+
!(target == "microsoft.estimator") &&
17+
!(target.startsWith("microsoft") && target.endsWith("cpu"))
1918
);
2019
}
2120

@@ -28,5 +27,5 @@ export function shouldExcludeProvider(provider: string) {
2827
}
2928

3029
export function supportsAdaptive(target: string) {
31-
return target.startsWith("quantinuum");
30+
return !target.startsWith("ionq") && !target.startsWith("rigetti");
3231
}

0 commit comments

Comments
 (0)