Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Conversation

@swernli
Copy link
Collaborator

@swernli swernli commented Jan 21, 2021

This PR merges the payload from feature/decomp to enable target packages for Q# runtime. This resolves #249 (see that issue for details on the individual elements and links to previous PRs and discussions). Here's the high level summary of the contents:

  • Introduces an opt-in alternate behavior for C# generation where body intrinsic callables are generated as concrete classes that expect their implementation to be provided via an object implementing a matching interface.
  • Adds interfaces for each intrinsic callable in the three target packages.
  • Adds Q# implementation for decompositions and intrinsics for three target packages (Qsharp.Core, Type1.Core, Type2.Core).
  • Updates the wrapper around the full state simulator to provide implementations for all three target packages.
  • Splits the existing Qsharp.Core into Qsharp.Core and Qsharp.Foundation, where the latter contains common implementations shared across all target packages.
  • Refactors dependencies across the package hierarchy to allow for alternate target packages to be chosen at compile time.
  • Updates test infrastructure to include testing of the simulator with Type1 and Type2 packages.
  • Adds a readme with guidance on the folder structure and package relationships for target packages that helps guide additions of new packages.

swernli and others added 30 commits June 17, 2020 18:26
* Refactor QSharp.Core into Foundation + Core

* Trying to fix sln

* Splitting Utils.qs

* Moving ClassicalControl.qs

* Reverting Intrinsic.I change
Merging master and fixing up solution file.
Merge remote-tracking branch 'origin/master' into swernli/decomp-merge-master
Merge remote-tracking branch 'origin/master' into feature/decomp
Merge remote-tracking branch 'origin/master' into feature/decomp
Something about the merge from master makes it so the new tests for Honeywell and QCI executables fail when run against the resource estimator. By skipping these tests temporarily, I can at least be unblocked to continue development.
This change splits all the intrinsics and decompositions defined in QsharpCore out into their own files to allow them to be individually combined into a target definition package.

 Q# should include decompositions to alternate quantum gate sets #249
…tiQubit.qs

Co-authored-by: Sarah Marshall <33814365+samarsha@users.noreply.github.com>
This changes continues building on the work in feature/decomp to enable targeting alternate gate sets via packages specifying the supported set of intrinsics and decompositions for that gate set. This introduces Type2, which targets a set of intrinsics that includes SWAP and the 3 Pauli Ising gates. It also adds support for executing against this target package in the QDK simulator, and shares some of the existing intrinsic unitary tests to validate behavior of the package.

See #249 for the rundown on what work is part of this overall feature.
This change adds the Type1 target package for Q# targets that support a limited number of control operations. The change includes support for simulating a Type1 package and tests that verify unitary gate behavior for that package. This part of the ongoing work described in #249.

Co-authored-by: Chris Granade <chgranad@microsoft.com>
Co-authored-by: Sarah Marshall <33814365+samarsha@users.noreply.github.com>
@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

swernli added a commit to microsoft/QuantumLibraries that referenced this pull request Jan 21, 2021
With the ongoing refactor of the qsharp-runtime repo to support target packages, the Microsoft.Quantum.Simulators package no longer automatically brings in the Microsoft.Quantum.QSharp.Core package, so projects need to explicitly add that reference if they are have suppressed loading of the core package via `IncludeQsharpCorePackages` set to false. See microsoft/qsharp-runtime#476, which this change will help unblock.
swernli added a commit to microsoft/iqsharp that referenced this pull request Jan 22, 2021
With the ongoing refactor of the qsharp-runtime repo to support target packages, the Microsoft.Quantum.Simulators package no longer automatically brings in the Microsoft.Quantum.QSharp.Core package, so projects need to explicitly add that reference if they are not using the QDK. See microsoft/qsharp-runtime#476, which this change will help unblock.
swernli added a commit to microsoft/QuantumLibraries that referenced this pull request Jan 22, 2021
With the ongoing refactor of the qsharp-runtime repo to support target packages, the Microsoft.Quantum.Simulators package no longer automatically brings in the Microsoft.Quantum.QSharp.Core package, so projects need to explicitly add that reference if they are have suppressed loading of the core package via `IncludeQsharpCorePackages` set to false. See microsoft/qsharp-runtime#476, which this change will help unblock.
Copy link
Contributor

@bettinaheim bettinaheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as per our code review meeting on behalf of the team.
(Please look into the perf tests before merging. Thanks!)

@swernli
Copy link
Collaborator Author

swernli commented Jan 29, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@swernli swernli merged commit 974a385 into main Jan 29, 2021
@swernli swernli deleted the swernli/feature/decomp branch January 29, 2021 03:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Q# should include decompositions to alternate quantum gate sets

3 participants