Skip to content

Release v0.11.0

Compare
Choose a tag to compare
@github-actions github-actions released this 03 Nov 16:54
b1e5cfd

Changelog

Version 0.11.0 (November 3rd, 2021)

Summary

This release introduces Observables as a major new feature to the Mitiq workflow and a few breaking changes. Support
for Pennylane has been added by adding pennylane.QuantumTapes to mitiq.QPROGRAM.

New features

  • Specify and use a mitiq.Observable in any error-mitigation technique.

    • This means the executor function does not have to return the expectation value as a float anymore, but rather
      can return a mitiq.QuantumResult - i.e., an object from which the expectation value can be computed provided
      an observable.
    • The executor function can still return a float, in which case the Observable does not need to be specified
      (and should not be specified).
  • All error mitigation techniques can now use batching with the same interface.

  • PEC can be run with only a subset of representations of the gates in a circuit. In other words, if the circuit has
    two gates, H and CNOT, you can run execute_with_pec by only providing an OperationRepresentation for, e.g.,
    the CNOT.

    • Before, you had to provide all representations or an error would be raised.
    • Performance of PEC may be better by providing all OperationRepresentations. This change is only with respect to
      usability and not performance.
  • Circuits written in Pennylane (as QuantumTapes) are now recognized and suppported by Mitiq.

Breaking changes

  • Signatures of execute_with_xxx error-mitigation techniques have changed to include Observables. The default value
    is None, meaning that the executor should return a float as in the old usage, but the additional argument and
    change to keyword-only arguments (see below) may require you to make updates.

  • You must now use provide keywords for technique-specific arguments in error mitigation techniques. Example:

# Example new usage of providing keyword arguments. Do this.
execute_with_pec(circuit, executor, observable, representations=representations)

instead of

# Old usage. Don't do this. Technique-specific arguments like `representations` are now keyword-only.
execute_with_pec(circuit, executor, observable, representations)

The latter will raise # TypeError: execute_with_pec() missing 1 required keyword-only argument: 'representations'.

  • The first argument of execute_with_zne is now circuit instead of qp to match signatures of other
    execute_with_xxx functions.

All Changes

Huge thanks to all contributors on this release! @Misty-W, @AkashNarayanan, @purva-thakre, @trbromley, @nathanshammah,
@crazy4pi314, @andreamari, and @rmlarose.