Closed andreamari closed 3 years ago
+1.
Note matplotlib is already a requirement of Cirq https://github.com/quantumlib/Cirq/blob/master/requirements.txt#L6.
Agreed, especially since we already have the dependency with cirq.
@crazy4pi314 to sync up with @rmlarose
As this has been merged, I'll close this now.
Issue Description
Very often one is interested in qualitatively "seeing" the best fit generated by a ZNE factory. Currently it is possible to do this by hand: by extracting data from the factory and plotting it.
Proposed Solution
Maybe it could nice if Factory objects had a self.plot() method which directly produces a plot of the best fit with a some nice and fixed style. Perhaps we could also include additional data in the plot legend (e.g. zne limit, error, etc. ). In this way one would get a compact visualization of the full error mitigation process.
This idea is inspired by the
lmfit
package in which a similar feature exists. See, e.g., https://lmfit.github.io/lmfit-py/examples/example_emcee_Model_interface.htmlPossible drawback: need to add
matplotlib
to the requirements.