Clifford representation incorporating global phase#1667
Open
willsimmons1465 wants to merge 22 commits intomainfrom
Open
Clifford representation incorporating global phase#1667willsimmons1465 wants to merge 22 commits intomainfrom
willsimmons1465 wants to merge 22 commits intomainfrom
Conversation
Contributor
Author
|
I may have been a little stupid in creating this. I only just realised that there is actually no need to keep it in a unique normal form, and relaxing the constraints on the form massively reduces the number of cases we need to consider (especially once I have also extended it to work with mixed states). I'm currently updating the document with the maths, and then will update the code to this simpler and more flexible version |
|
This pull request has been automatically marked as stale. |
Contributor
|
Is this still happening or should we close this PR @willsimmons1465 |
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.
Description
This PR adds a new C++ class for the efficient simulation of Clifford states, including global phase. This is based on the "reduced affine with phases form" (reduced AP-form) described in [Chapter 5, “Picturing Quantum Software”, Kissinger & van de Wetering], tracking a normal form for the state which has a well-defined reference phase, from which we can track global phase as the relative difference.
This class comes with direct simulation in the basis {CZ, S, V} where these were found to give some of the simplest proofs of correctness, though this still involves many cases and the derivations are non-trivial. Proofs which track the global phase are available internally within Quantinuum, and can be provided to external colleagues on request. Other gate types are handled by reducing into this gate set, but I can add additional methods for them directly if that is preferred (e.g. Pauli gates are much simpler to perform directly than via S and V).
Due to the constraints of maintaining the normal form, this is noticeably more expensive than tableau simulation, since each gate takes O(n^2) time to apply (where n is the number of qubits in the circuit), as opposed to the O(n) time for tableau updates. Because of the increased cost, I am yet to incorporate this into any live optimisation pass. I'd appreciate some suggestions on where we think it is worth it to add cost for global phase tracking or if there is a nice way to make that optional depending on the user's requirements. Similarly, the complexity of this makes me not want to expose it to Python users yet unless others can think of a good use case where people want direct access to it.
Converters are included to go between
APStateandCircuitorSymplecticTableau(from which one can wrap it in aChoiMixTableau, constrained to pure states).I'd like to be able to use this in the new
PauliGraphclass, butChoiMixTableaustill provides more utility, from supporting mixed processes and the rows having semantic meaning to the rest of the class. The only way I can think of incorporating global phases would be to duplicate tracking of the Clifford regions via both aChoiMixTableau(for the semantic value of the rows and simplifying rewrite strategies on the graph) and anAPStateto track global phase changes (in this case, where it is enough to just track the phase without trying to maintain the entire semantics, it is sufficient to simulate the result of applying the linear map to the |0> state, rather than simulating the entire isometry as an open process, which does reduce the cost). I'm keen to hear any other suggestions for how to handle this, and if there is a way to do it without duplication.Related issues
Closes #1659
Checklist