6

What is a "shot" in relation to quantum computing? I heard it is repeating time, but I don't understand it. Additionally, why is the default number of shots 1,024 in the IBM Q Experience?

One more question - I saw the sentence for each value of the shots, the experiment repeated 100 times. What is this mean? Is there difference between shots and repeated experiments? Are shot and experiment repetition same thing?

glS
  • 24,708
  • 5
  • 34
  • 108
김동민
  • 897
  • 7
  • 12

3 Answers3

6

Number of shots: Number of shots means how many times an algorithm is run to get a probability distribution of results.

Experiment is repeated: This means how many times an experiment is repeated with particular number of shots. Imagine, you repeated an experiment 100 times and you have 1,024 shots. In each experiement repetition some metrics is calculated based on probability distribution obtained from 1,024 shots (i.e. an algorithm repetitions). The metrics can be, for example expected value or any other metrics based on the results. Hence you have 100 values of the metric and you can do some statistics on them.

Overall, number of shots and experiment repetitions mean different things.

Default number of shots: IBM Q allows you to set different number of shots. Default value 1,024 is an arbitrary decision. There is no physical/technical reason for that value.

Martin Vesely
  • 13,891
  • 4
  • 28
  • 65
  • I don't understand this answer. When you say "some measure is calculated," do you mean "some measurement is performed"? I.e. ideally you end up with probability distributions for 100 different observable quantities, all corresponding to the same quantum state (in principle, neglecting noise)? I don't understand exactly what is changing between experiments. Also, "deliberate" means "carefully chosen for a good reason." Do you instead mean to say "arbitrary", which is the opposite ("chosen for no good reason")? – tparker Feb 11 '20 at 12:53
  • I corrected my answer, hope now it is more understandable. Measure - this means some metric or value, for example expected value, you can calculate based on the results. Nothing is changing between experiments, sometimes you have to repeat the experiment many times to get enough values for calculating some statistics. Deliberate - yes, you are right, I meant "arbitrary". – Martin Vesely Feb 11 '20 at 14:12
  • 4
    If nothing is changing between experiments, then it sounds to me like you're just performing $100 \times 1024 = 102400$ identical experimental runs, and then arbitrarily choosing to bucket those runs into 100 different identical "experiments." Couldn't you take the exact same data set of 102400 different measured values and decide (after the fact) that that actually represents 400 different experiments of 256 shots each? – tparker Feb 11 '20 at 15:33
  • But if you want to calculate for example expected value of the distribution and evaluate accuracy of such calculation, you have to repeat experiment many times to be able to evaluate an error. Maybe answer to this question can help better understand: https://quantumcomputing.stackexchange.com/questions/9797/when-increase-the-shot-why-the-result-is-different – Martin Vesely Feb 11 '20 at 16:17
  • 1
    Of course I understand the importance of running the algorithm many times in order to get statistics on the distribution. But respectfully, I believe you are missing the point of this question. If each "experiment" is identical and consists of 1024 (procedurally) identical "shots", then how is this any different from one "experiment" that consists of 102400 "shots"? In either case, you're performing the exact same experimental procedure 102400 times, and yet end up with 102400 different data points to perform statistics on. You've just chosen to bin them in an arbitrary way. – tparker Feb 11 '20 at 16:30
  • Lets consider my example with expected value. If you do 102400 experiments, you have 102400 data points and only one value of expected value. But if you do 100 experiments with 1024 shots each, you have 100 different values of expected value and you can calculate for example accuracy of your expected value estimation. As I wrote earlier, conditions of each experiments are the same but quantum systems are stochastics, which means that expected value can be different a little bit for each experiment. Of course, this is true for any other metrcis you calculate based on the results. – Martin Vesely Feb 11 '20 at 18:50
  • I could imagine that binning your 102400 data points into 100 bins might be useful for data analysis after the experiment is complete. But that can all be done after the experimental run is over. Am I correct in understanding that the 102400 data points were all gathered under identical experimental conditions? So you could just tell the lab technician how many data points you needed, and she would have no need to know how you were factoring those 102400 data points into $n$ "experiments" of $m$ "shots" each? – tparker Feb 13 '20 at 23:11
  • 1
    Yes, you are right. But currently the problem is that IBM Q (I do not know how other quantum computers) allows to use at maximum 8,192 shots. So you have to repeat an experiment many times to get enough data. – Martin Vesely Feb 14 '20 at 05:30
5

"A shot is a single execution of a quantum algorithm on a QPU. For example, a shot is a single pass through each stage of a complete quantum circuit on a gate-based QPU"

From https://aws.amazon.com/braket/pricing/

It seems that the definition of a shot becomes very important when money is involved. :)

LeWoody
  • 844
  • 1
  • 8
  • 14
2

Shots are implementations of identical experiments that have same algorithm and same parameters (initial states). However, we can repeat experiments with different parameters while we keep number of shots the same for each experiment.

Appo
  • 71
  • 4