Skip to content
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

Use qsharp package to generate QIR #641

Merged
merged 12 commits into from
Oct 22, 2024
Merged

Conversation

idavis
Copy link
Contributor

@idavis idavis commented Sep 25, 2024

This change replaces the usage of qiskit-qir with the qsharp package. Of note:

  • targetCapablities is deprecated where possible and replaced with TargetProfile. Since qsharp is an optional dependency when not using Qiskit, the type is forward declared with a str union option.
  • New target_profile parameter is set to replace targetCapablities where possible.
  • Job submissions should be sending target_profile for metadata.
  • Logging of pre-post translation to QIR is changed.
  • Basis gates are unified based on the qsharp QIR generation intrinsics. All changes to gateset are handled with decompositions with the exception of barrier which is only sent for a single target. There had been changes to the QIR job submission gate sets that broke this behavior.
  • azure/quantum/qiskit/backends/quantinuum.py had the default profile/caps set to basic execution. This PR fixes the profile setting for this backend.
  • While the qsharp package can perform local resource estimation, the existing service submission is left intact with the new QIR generation code paths. PyQIR is used to implement output recording calls which are always part of qsharp code generation, but aren't handled by the service.
  • Register order no longer has to be inverted client side. The qsharp QIR generation correctly sets endianness of output recording to match Qiskit's semantics. This does mean that accessing data from jobs submitted with earlier versions will have incorrect result rendering.

@idavis idavis self-assigned this Sep 25, 2024
@idavis idavis force-pushed the iadavis/qsharp-qir-generation branch from e40122c to 0a3d926 Compare September 27, 2024 15:42
@idavis idavis marked this pull request as ready for review September 27, 2024 15:42
@idavis idavis requested a review from a team as a code owner September 27, 2024 15:43
azure-quantum/azure/quantum/qiskit/job.py Outdated Show resolved Hide resolved
@kikomiss
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@idavis idavis force-pushed the iadavis/qsharp-qir-generation branch from ec7f48a to 02f4fe5 Compare October 15, 2024 23:25
@idavis idavis requested a review from kikomiss October 21, 2024 22:23
@idavis idavis force-pushed the iadavis/qsharp-qir-generation branch from 02f4fe5 to 17cf9e8 Compare October 21, 2024 22:24
@kikomiss
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@kikomiss kikomiss merged commit 46c47f8 into main Oct 22, 2024
7 checks passed
@kikomiss kikomiss deleted the iadavis/qsharp-qir-generation branch October 22, 2024 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants