This repository was archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 90
Native Simulator: change prereq check in state injection to return false instead of throw #433
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 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>
Create QsharpCore targeting package
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.
Merge master into feature/decomp
Fixing csproj QDK versions
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>
Merging main to feature/decomp
Merge main and clean-up project references
Updates/fixes to decomposition feature branch
Fixing negative exponentiation in ExpFrac
…lse instead of throw
Contributor
Author
|
Oops. Wrong branch. Will republish the PR in a moment. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I misunderstood specifications of PrepareArbitraryState. The API guarantees that if the qubits, the state is being injected for, are unentangled and each is in state |0>, then they will be transformed into the requested state, otherwise, the API will perform a valid albeit undefined unitary operator but it shouldn't throw.
Considered options:
(*) Given how state setting is implemented now. Conceivably, there might be other algorithms that are both efficient and guarantee unitariness even if prereqs aren't satisfied? Also, could we still do this for total state injection?
(**) I don't believe it's easy/efficient to implement emulation of adjoint state prep, but even if it were, the unitary we apply cannot depend on the state of qubits because the base/adjoint might be applied in different states.
Note: The bug was found in course of reviewing microsoft/QuantumLibraries#370