-
Notifications
You must be signed in to change notification settings - Fork 59
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
ComputeUncompute circuit transpilation option. #195
base: main
Are you sure you want to change the base?
Conversation
Edit: I didn't see the issue explaining the problem with
|
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 in favor of adding the pass manager input, as @rihartma mentions in #194, the use of .inverse()
modifies the set of gates in the circuit and requires it to be re-transpiled. I think this would be the simplest solution for ISA-compatibility across the library.
However, I think it's also important to note that this makes it the user responsibility to design a pass manager that does the job (for example, basis translation in this case) but is as light-weight as possible not to hurt performance in iterative algorithms. I don't think that should be a blocker though, if the alternative is the class not respecting the ISA constraint.
@woodsp-ibm what do you think?
(also note that CI tests against main breaking is not an issue, it's unrelated to the content of the PR) |
Pull Request Test Coverage Report for Build 10186952664Details
💛 - Coveralls |
A couple of observations first:
Given the above my take would be to just rely on ML going forwards for this functionality. If you need/want to use that in the next couple of weeks before V1 primitives are removed you can use a locally modified instance of the code. Just a couple of comments on the PR anyway: For me putting the Passmanager ahead of options and local, given that these can be passed positionally, may be a breaking change for some users that pass these. I know it fails on Runtime Sampler due to ISA but it still works with the reference Sampler from Qiskit and the Aer one. Such a change may break these latter cases. It would need a test case for the new function and a release note. But given the short time until this will no longer work with Runtime and with it being "moved" to ML, my take would be that its really too late now for this change. Thank you for the submission though. |
Summary
Solves #194
Add a new (optional) parameter to a ComputeUncompute class - a
pass_manager
. This pass manager is used to transform the compute-uncompute fidelity circuit to satisfy the pass manager constraints.Details and comments