Closed timmintam closed 1 month ago
I just saw this again. I actually think that, provided we document this well, the above suggestion would be better than the current implementation. I stumbled a little bit when I did some quick testing and did not pay attention to the fact that the user_provided_shots
must be a multiple of shot_batch_size
. While that is technically documented it did not stand out very much.
If we instead apply the suggestion above, all values of user_provided_shots
and shot_batch_size
will be valid.
The default is shot_batch_size=1
which also means that the user_provided_shots
value equals the number of shots that will be actually run. If a user now deliberately overwrites shot_batch_size
they must have read its docs to understand what this does. That would be a natural place to document the behavior w.r.t. the increased number of physical shots submitted to the backend :+1:
We could either do this, or reverse it and interpret the user-provided
shots
value (which is the input here) asnum_batches
and then document that the actual number of shots that will be run on the hardware equals:I don't have a strong opinion on this. This suggestion would avoid the requirement of a
ValueError
and ensures that all values forshots
are valid. But this is at the expense of a user potentially over-committing their shots.Originally posted by @oss-zurich in internal IBM GIthub
-> Pending question, to be discussed in the Tuesday meeting.