-
Notifications
You must be signed in to change notification settings - Fork 50
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
noncliff: define _proj
subroutine for projectrand!
and test multi-qubit projection for stabilizer and non-stabilizer states
#355
Conversation
I think the PR is ready for review. I hope it's not awkward. Thank you! |
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.
Thanks for starting this, it is incredibly helpful to have someone tackle it.
I left a few comments in, but I think there is a bigger thing that is currently unclear to me: in _proj₊
you access only the base tableau out of which all terms in the weighted sum are generated, but you do not access any of those terms themselves, nor are their relative weights taken into account. And it seems that you are returning a pure state, not a GeneralizedStabilizer
. But one single measurement is not enough to turn a mixed state into a pure state, so there must be an issue with the current code.
Thanks for your pertinent observation. Indeed, something was wrong as I was only considering the tableau, not the catering This is why Ted says that 'trace Tr [τ′] = Tr [χ′] is the probability of measuring 0' when talking about the case of measuring 0. My bad... Now, we have deterministic |
18a3b7b
to
b367530
Compare
The PR is ready for review, Thank you! |
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.
Thanks for continuing with this. It seems there are a few mistakes in the tests. Could you look into them?
Thank you for your feedback. I've removed This PR focuses solely on implementing I’ll address I attempted to use the suggested test (shown below) from this comment: discussion link, but I encountered an error when testing with While the test may be basic, I would appreciate your feedback on its conceptual correctness. I hope it doesn't fall into the trap of being tautologically true. The tests pass for Thank you again for your guidance, and I look forward to your thoughts.
|
Thank you for your valuable feedback! This PR builds upon the scaffolding introduced in #420, addresses #418, and includes a test for Overall, this PR demonstrates that GeneralizedStabilizer encompasses all the capabilities outlined in the Gottesman-Knill theorem. It also extends the aforementioned theorem by showing that multi-qubit stabilizer states, when subjected to multi-qubit randomized non-Clifford gates, can be probabilistically projected through repeated trials. These findings reinforce Ted's conclusion that "no magic state will be simulatable through every stabilizer circuit." Edit: The graph TD
subgraph NittyGritty [ ]
direction TB
D--> D1[define_proj]
end
subgraph Tests [ ]
direction TB
E[Consistency Tests] --> E1[random_stabilizer, *done* <br>random_pauli, *done* <br> random_clifford, *done* <br> non-stabilizer *done*]
end
subgraph ScaffoldingBranch [ ]
direction TB
B[Scaffolding] --> B1[completed]
end
subgraph ErrorBranch [Unrelated Errors, <br> Issue #418]
direction TB
C[Unrelated Errors, <br> Issue #418] --> C1[Resolve projection inconsistencies for multi-qubit Stabilizer/MixedDestabilizer]
end
A[projectrand!] --> C
A[projectrand!] --> B
A[projectrand!] --> E
A --> D[Nitty Gritty]
Additional work: Update: added with the recent commit: ca9bcee I have also started working on the remaining task shown in the mermaid diagram. Increasing the number of repetitions has been shown to improve the success probability, exceeding Test/Reproducible:
I think this aligns with the probabilistic nature of non-Clifford simulations, as discussed by Bravyi and Gosset in their paper Improved classical simulation of quantum circuits dominated by Clifford gates. They introduced an algorithm for approximating the output probability Ted also provide comparable insights in the conclusion section: The set of states that are stabilizer circuit efficient is related to the set of magic states, those states that, when combined with stabilizer circuits, allow universal quantum computation. The problems are essentially complementary; no magic state will be simulatable through every stabilizer circuit (assuming BQP is larger than BPP, that is). With qudits of odd prime dimension, it was recently found in https://arxiv.org/pdf/1201.1256 that a sufficient condition for a state to be efficiently (weakly) simulated through stabilizer circuits is that a certain quasi-probability representation of the state be positive. Reproducible 2 for Issue 309 results: The results demonstrate that the post-measurement complex density matrices match the expected outcomes (printed as TRUE), supporting Ted's comment that we can simulate some 'magic' states using the stabilizer-defined basis. However, not all 'magic' states are simulatable in this way (printed as FALSE), as noted by Ted. PFA: 3_qubit_ncgate_results.txt
|
…dStabilizer states for stabilizer simulation
This PR is ready for review, Thank you! Edit: Pardon - I've now added the remaining probabilistic non-stabilizer simulator tests, testing up to 10 qubits with random non-Clifford gates at randomized positions. I also did some further reading on probabilistic non-stabilizer simulators, incorporating insights from Ted's paper and other key studies in the additional work section: #355 (comment). |
…n as mentiond in earlier conversation comment
_proj
subroutine for projectrand!
_proj
subroutine for projectrand!
and test multi-qubit projection for stabilizer and non-stabilizer states
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.
I am not sure whether this is actually finished, but there was a review request. There seems to be some pretty severe issues with this implementation. See the comments.
Could you run me through why this was done in this way? I am a bit confused what the goal or reasoning was.
I must acknowledge that I overlooked pages 6 to 8 and equations 14 to 26, which provide the constructive proof of the equations. Although I was aware of this section, I neglected to incorporate it properly. Furthermore, the proper implementation of Algorithm 2, which embodies the constructive proof, was absent from my initial submission. This was a significant oversight on my part, and I apologize for the mistake. It is also evident that my earlier attempt did not effectively translate the paper into code but rather resulted in a somewhat confused interpretation. For example, the author dedicated two pages to explaining Pauli measurements before presenting Algorithm 2 using the specialized stabilizer basis, emphasizing that a proper implementation requires a more thorough approach than the simplistic one I initially attempted. This misstep is, admittedly, quite embarrassing. I greatly appreciate your feedback and patience throughout this process. Based on your comments, I have revisited the paper's methodology and reworked the implementation to align with the original approach outlined in Algorithm 2. As a result, I am closing this PR in favor of the new work, which is currently in progress: #427. |
PR implements
project!
fornoncliff.
Basic tests are added as well.