Skip to content
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

calibrate_observable_estimates mutates PauliTerm instead of using interface #208

Open
jlapeyre opened this issue Feb 27, 2020 · 0 comments
Labels

Comments

@jlapeyre
Copy link
Contributor

jlapeyre commented Feb 27, 2020

This code mutates the coefficient attribute of PauliTerm directly

observables = [copy(res.setting.observable) for res in expt_results]
for obs in observables:
obs.coefficient = complex(1.)

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant