-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Feature Request] Better QFT Compilation in the Pauli formalism #263
Labels
enhancement
New feature or request
Comments
5 tasks
What is the status of this issue? |
@isolatedinformation No work has been done yet. As by our conversation on Slack, passing it over to you. CC: @alexnguyenn |
3 tasks
Also this issue has a part about sparse representation for rotations #269 doesn't address that. Perhaps this is best split it a different issue @isolatedinformation ? |
We won't be able to compile the 128 QFT without sparse representation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description
Our implementation of the Pauli Formalism is very slow - see the benchmark in #258. Additionally it also generates 4x more ls instructions, but there is a chance to generate even fewer.
Proposed Solution
Compilation speed
The slowness, compared to the gate based pipeline, is due to the fact that QFT circuits are dominated by very long single qubit Clifford+T approximations and our pipeline pads single qubit rotations with identities to span the whole width of the circuit. Switching to a sparse format (like in the gate based pipeline) is likeley to speed up this step and drastically reduce memory footprint.
Computation depth
The bottle neck is approximations of arbitrary rotations, where we are going to gates and back, Increasing the length at the computation at every step:
Now, our pipeline is:
We have the opportunity of using directly Pauli rotations to approximate rotations:
The approximation with rotations translates directly to LS instructions. With this pipeline, we should generate fewer ls instructions than with the gate based pipeline, which still does the Hadamards and separates groups like
ZST
which are a singleZ_7pi/8
rotationTo do that, we reinterpret the Gridsynth approximations, which are in a normal form (as shown below), and cache them directly as rotations. We do so by grouping Zs, Ss and Ts and "sandwiching" them between Hadamard gates, and seeing that as a basis change:
Some gate ->
TSHTHTHSTHZSTHTH...
->
TS
HTH
T
HSTH
ZST
HTH
...->
Z_3pi/8
HZ_pi/8H
Z_pi/8
HZ_3pi/6H
Z_5pi/8
HZ_pi/8H
...->
Z_3pi/8
X_pi/8
Z_pi/8
X_3pi/6
Z_7pi/8
X_pi/8
...Then these translate directly to ls instructions.
Additional References
If applicable, provide some references that will help us better understand the request.
The text was updated successfully, but these errors were encountered: