Bring back exact probabilities for SamplerV2.
What should we add?
In the old primitives, it was possible to obtain ideal results, i.e. exact probabilities with the Sampler by setting shots to zero or None. This option is gone with the new SamplerV2 and a default shot number is always chosen. This is quite disruptive to common quantum workflows of, e.g., pre-optimizing a parametrized quantum circuit classically or testing algorithms efficiently.
FYI: Here is the context why the change is introduced. https://github.com/Qiskit/RFCs/blob/master/0016-sampler-interface.md#motivation-
FWIW you can always use qiskit.quantum_info.Statevector to get the exact probabilities, like
from qiskit.quantum_info import Statevector
probs = Statevector(your_circuit).probabilities_dict() # {"0..": prob, ... }
which you could even wrap into the PrimitivesV2 interface to use a plugin replacement.
We can't add new semantics to an existing option on a general interface definition, though there's nothing stopping something like Aer's implementation of the V2 primitives from having an extra entry point that does this. That said, Aer still offers direct-access backends, which is probably what the Aer team would suggest to do if this passed to them.
I'll close this now, as there's nothing we can do in the core repo about it without breaking the interface definition. Feel free to re-open or take elsewhere if there's more to discuss.