Fix global phase for PauliI rotation and DumpRegister#1461
Merged
Conversation
This change introduces a new, stdlib-only intrinsic for applying global phase during simulation to make phase behavior more consisten and fixes #1450. This intrinsic only applies the global phase during simulation; the new `GlobalPhase` intrinsic is a no-op for QIR generation, circuit generation, and resource estimation. The change also includes updates to the stdlib and associated tests to account for the corrected global phase behavior. This also fixes a bug in `DumpRegister` related to iteration through the state vector that ensures the "base" amplitude used for separating the state is consistently chosen, which avoids corner cases that could introduce a phase in the displayed output that wasn't present in the underlying state.
11 tasks
|
Change in memory usage detected by benchmark. Memory Report for 05e923e
|
Benchmark for 05e923eClick to view benchmark
|
Collaborator
Author
|
@tcNickolas Ok, with the combination of these changes and the teleport sample update from #1456, I've confirmed a few things of note:
There is still one other issue remaining from #1317 that will require changes to the internals of the simulator, which will be in another PR (hopefully out soon). |
minestarks
reviewed
May 2, 2024
minestarks
approved these changes
May 2, 2024
Member
minestarks
left a comment
There was a problem hiding this comment.
The actual global phase fix is beyond my knowledge, but the evaluator/backend bits LGTM
|
Change in memory usage detected by benchmark. Memory Report for 329443a
|
Benchmark for 329443aClick to view benchmark
|
ivanbasov
approved these changes
May 3, 2024
idavis
approved these changes
May 4, 2024
|
Change in memory usage detected by benchmark. Memory Report for ea0a767
|
cesarzc
approved these changes
May 6, 2024
Benchmark for ea0a767Click to view benchmark
|
DmitryVasilevsky
approved these changes
May 6, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change introduces a new, stdlib-only intrinsic for applying global phase during simulation to make phase behavior more consisten and fixes #1450. This intrinsic only applies the global phase during simulation; the new
GlobalPhaseintrinsic is a no-op for QIR generation, circuit generation, and resource estimation. The change also includes updates to the stdlib and associated tests to account for the corrected global phase behavior.This also fixes a bug in
DumpRegisterrelated to iteration through the state vector that ensures the "base" amplitude used for separating the state is consistently chosen, which avoids corner cases that could introduce a phase in the displayed output that wasn't present in the underlying state.