Open jyu00 opened 3 months ago
I'm not familiar with how the estimator works. How is the dictionary used as the observable?
ObservableLike = Union[
str,
Pauli,
SparsePauliOp,
Mapping[Union[str, Pauli], float],
]
The dictionary key must be immutable objects in Python. Can it be the hash value or a label of Pauli?
Thanks and sorry for novice questions.
What is the expected enhancement?
If I want to build my own Estimator-like function, for example, which accepts a mapping with
Pauli
as the key, as described in the spec, this does not currently work. The job would fail withsince the default JSON encoder doesn't accept
Pauli
as a dictionary key type.