Ikko Hamamura

Results 71 comments of Ikko Hamamura

Once @blakejohnson's comments are resolved, I think this PR is mergeable.

We cannot see the docs of `BasePrimitivesResult` because it's not indexed. so you need to add `BasePrimitivesResult ` to the module docstrings in `primitives/__init__.py`.

I want to wait @t-imamichi's approval.

Wait for the Runtime side to design the Option.

The size of `Statevector` scales exponentially, so we cannot make 100 qubits Statevector like `random_circuit(num_qubits=100, depth=30)`.

By caching, we can't free up resources beyond the pointer, so we end up caching huge data, is this correct? How about `len(self._circuits)` instead of fixed number `256`? Or, again,...

Thank you for your explanation. Why do you want to cache at the class level? I feel like instance level is fine. (Is there any specific use case?) I suppose...

I have reconsidered this issue. Primitives could be more efficient if it cached probability distributions (`state.probabilities(qargs=qargs)`), and Estimator cached expectation values (`np.real_if_close(state.expectation_value(observable))`) and variances (`sq_exp_val - expectation_value**2` if shots is...

Great! Thank you for fixing the bug. This fix looks good. Could you add some tests for this problem and [release note](https://github.com/Qiskit/qiskit-terra/blob/main/CONTRIBUTING.md#release-notes)?