-
Notifications
You must be signed in to change notification settings - Fork 90
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
Fix global phase for PauliI
rotation and DumpRegister
#1461
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.
Change in memory usage detected by benchmark. Memory Report for 05e923e
|
Benchmark for 05e923eClick to view benchmark
|
@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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
Change in memory usage detected by benchmark. Memory Report for ea0a767
|
Benchmark for ea0a767Click to view benchmark
|
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.