rigetti / forest-benchmarking

A library for quantum characterization, verification, validation (QCVV), and benchmarking using pyQuil.
Apache License 2.0
53 stars 22 forks source link

calibrate_observable_estimates mutates PauliTerm instead of using interface #208

Open jlapeyre opened 4 years ago

jlapeyre commented 4 years ago

This code mutates the coefficient attribute of PauliTerm directly

https://github.com/rigetti/forest-benchmarking/blob/61a468f1ee62ac34913fc269207720fe49149104/forest/benchmarking/observable_estimation.py#L1001-L1003

But, PauliTerm offers a an interface that does the same thing

https://github.com/rigetti/pyquil/blob/d45246d183a7308187bc28442c73714e87f7c25a/pyquil/paulis.py#L557-L570