You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enhance GateModelResultData to support direct probability data #63
This works well for QPUs and for simulators that return raw measurement counts. However, many ideal quantum simulators compute the exact quantum state, providing deterministic results. These simulators do not involve probabilistic sampling, and the concept of shots does not apply. Consequently, these simulators do not return raw measurements or measurement counts, but instead provide direct probability data (histogram).
To better support these simulators, the GateModelResultData class should be updated to optionally accept pre-computed probabilities. This would allow get_probabilities() to return these probabilities directly, without needing to calculate them from counts.
TODO
Add an optional argument to the GateModelResultData class to accept pre-computed probabilities.
If probabilities are provided, get_probabilities() should return them directly.
If probabilities are not provided, get_probabilities() should maintain its current behavior of calculating probabilities based on get_counts().
Regardless of whether probabilities are computed from counts or provided directly, get_probabilities() should continue to respect the decimal=True/False option for formatting keys.
Since the function for normalizing data will now apply to both counts and direct probability histograms, consider renaming normalize_counts() to something more general, like normalize_histogram_data().
Activity