Closed cosenal closed 1 month ago
Thanks @cosenal! I've pinged @rmoyard to take a look
Thanks, @josh146. Thanks to @dime10, I have now resolved the errors, and this approach now works 🎉
I haven't publicized the PR yet, because I wanted to clean it up and write tests, but before I do that, it may be a good idea if you or Romain take a preliminary look and give me feedback on the approach.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.93%. Comparing base (
daa7109
) to head (afe58f8
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks, @josh146. Thanks to @dime10, I have now resolved the errors, and this approach now works 🎉
I haven't publicized the PR yet, because I wanted to clean it up and write tests, but before I do that, it may be a good idea if you or Romain take a preliminary look and give me feedback on the approach.
Thanks @cosenal, this looks great to me!
@dime10 @rmoyard @WrathfulSpatula This PR is now ready for review (I don't have permission to formally request reviewers on this repo).
Context: We'd like to extend Zero-noise extrapolation (ZNE) with different folding techniques. For more details, see #755 and https://mitiq.readthedocs.io/en/stable/guide/zne-3-options.html#unitary-folding.
Description of the Change: In this PR a
folding
argument is added both to the ZNE mitigation routine in Catalyst API/frontend/MLIR dialect. At the moment the argument is passed throughout the stack from the frontend all the way to the MLIR dialect. However it is mute, in the sense that it's not being used to change the behavior of the MLIR ZNE transform.Benefits: This is an incremental change to discuss design and to accomodate follow-up pull requests where the argument will be used to branch off the ZNE mitigation code for different unitary folding techniques.
Possible Drawbacks: The argument is left as
global
by default and it's not yet used in the MLIR transform, so the current behavior is unchanged. If one tries to use different value for the new argument, exceptions are raised.Related GitHub Issues: This is an incremental change towards #755.