-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
GateDirection pass goes outside allowed basis gates #10785
Comments
In general, the transpiler was never designed to support discrete-basis synthesis at the same level of support as for continuous basis gates. While it's If it's sufficient for you, we can potentially change the decomposition of the ECR reversal in |
I find it a major frustration when trying to do any testing and debugging of primitives at utility scale without real support for Clifford basis in the transpiler, and I think this only becomes more important as we increase the number of qubits and Clifford simulation becomes the only way to do simulator based testing. At the moment I'm not overly concerned about the sub-optimality of the result, just that it can run for testing and debugging. In the future it would be nice if it could synthesis optimally as well. Now this Clifford support this doesn't need to necessarily be discrete basis gates, it could use backend basis gates (which are Clifford + RZ), and then validate the RZ angles are k*pi/2, and then either have an extra pass to replace these with I, Z, S, Sdg depending on the angle, or update Aer to support clifford-angled RZs for its stabilizer method. But achieving will require making sure synthesis passes respect this by mapping Clifford to valid Clifford angled RZ decompositions in synthesis and optimization routines, which is currently not the case. |
If you have a particular need for a large-scale feature from Qiskit (which I would argue that optimal discrete-basis synthesis is), please can you be sure to mention it during quarterly planning so it can be worked into our prioritisation, and we can work out who will be responsible? |
Environment
What is happening?
Trying to run a clifford simulation on a fake backend with ECR basis gates leads to transpilation errors with unsupported basis gates
How can we reproduce the issue?
Raises
What should happen?
Running with a manually specified basis gates works (though the output is not at all optimized in terms of number of 1Q gates):
Any suggestions?
Running transpilation with a callback looks like the issues is due to the
GateDirection
pass which inserts non-Clifford gates outside the allowed basis gates into the circuit and causes the rest of the transpilation to fail.This pass should only insert gates supported by the backend, and be updated to work with Clifford basis backends to enable simulation testing
The text was updated successfully, but these errors were encountered: