Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
5.18k stars 2.35k forks source link

Upgrade primitive result dataclasses #8100

Closed pedrorrivero closed 2 months ago

pedrorrivero commented 2 years ago

What should we add?

In the context of EstimatorResult:

Cryoris commented 2 years ago

Adding variances is a good idea 👍🏻

About renaming values to expvals: I think we're not really using abbreviations anywhere in the user-facing interfaces but typically tend write the full word, so expvals is not really fitting this scheme. I personally think values is clear enough since it's an attribute on the estimator. But if you think it's not clear enough maybe we can use expectation_values (which gets a bit long though)?

pedrorrivero commented 2 years ago

Yes, I was first considering expectation_values, and also thought it was kind of long @Cryoris .

My main issue with values is that it is kind of vague. In statistics there are estimators for the variance (e.g. Bessel's), so just using the word "value" does not feel specific enough. What value? On top of that, but certainly less important, it can cause confusion with key-value pairs in a dictionary.

Maybe expvals is not the right name, but I think it would be nice to think of a more descriptive alternative. I am open to suggestions!

UPDATE: expectation_values seems to be receiving good feedback. Other alternatives are expectations and means.

t-imamichi commented 2 months ago

I close this because the discussion is obsolete