Q-Bridge
What Are Shots in Quantum Computing? Reading Measurement Counts
A shot is one run of a circuit that ends in measurement. Learn how shots become a counts table, how to read a histogram, why two runs differ, and how Q-Bridge lets you pick a shot count.
One shot, one bitstring
A quantum circuit that ends in measurement does not hand you its state. Measuring collapses the state into a single classical outcome: one bit for each measured qubit, written together as a bitstring such as `01` or `110`. Running the circuit once and reading that outcome is a shot.
That single outcome tells you very little. Suppose a two-qubit circuit gives `00` on one shot. Was `00` the likely result, or did you get lucky on a rare one? You cannot tell from one sample, in the same way you cannot judge whether a coin is fair from a single toss.
Many shots, one counts table
The fix is to repeat the circuit and tally what comes out. The result is a counts table: each bitstring that appeared, and the number of shots that produced it. The counts add up to the shot count you asked for.
For the usual first example, a Bell pair, you expect only two bitstrings to appear, the all-zeros string and the all-ones string, in roughly equal numbers. The mixed strings should be absent. The counts table makes that visible at a glance.
Counts are not the probabilities themselves. They are a sample from them. Dividing a count by the shot count gives an estimate of the probability of that bitstring, and like any estimate from a sample, it carries some error.
Why two runs of the same circuit differ
Run the Bell pair twice and you will rarely get identical tables. One run might split nearly evenly, the next might lean a little toward one side. Nothing is broken. Each shot is a random draw from the circuit's output distribution, so each batch of shots is a fresh random sample.
This is worth knowing for two reasons:
- It is not a sign of noise or a bug. An ideal simulator that applies every gate exactly as written still samples at the end, so its counts wobble too. The wobble is a property of sampling, not of hardware.
- It sets the resolution of your experiment. If two bitstrings have nearly the same probability, a small batch of shots cannot tell you which is larger. Their counts will swap places from run to run.
How the error shrinks, and how slowly
The sampling error in an estimated probability gets smaller as the shot count grows, but not in proportion. Making the estimate noticeably tighter takes a much larger number of shots, not a slightly larger one. That is the general behaviour of estimating a proportion from a sample, and it applies equally to a coin, a poll or a circuit.
The practical consequence is a trade-off. More shots give a steadier histogram, and they also take longer to run, and on a shared device they cost more. Pick the smallest shot count that answers the question you are asking. If you only want to confirm that a circuit produces the two peaks you predicted, a modest count is enough. If you are comparing two outcomes with close probabilities, you need more.
One more caution. More shots reduce sampling error only. If a real device has biased gates or readout, a bigger sample estimates the biased distribution more precisely; it does not recover the ideal one. Shot count and noise are separate things.
Reading a counts histogram
A histogram turns the counts table into bars: one bar per bitstring, height proportional to its count. A few habits make it easier to read:
- Check the bitstring order first. Different tools print qubits in different orders, so a bitstring may read left to right or right to left relative to your qubit numbering. Confirm the convention on a circuit whose answer you know before reading anything subtle.
- Look for what is missing. Bitstrings that should be impossible for your circuit are informative. On an ideal simulator they never appear. On a device, small stray bars are typically noise.
- Compare shapes, not single bars. Two bars of slightly different height are often within sampling error. Two runs that disagree about which of several outcomes dominates are the real signal.
- Remember what the axis is. Heights are counts out of the shot count. Normalise them yourself if you want probabilities.
Shots in Q-Bridge
Q-Bridge is a web dashboard for writing OpenQASM circuits, running them and keeping the resulting jobs. Two parts of it touch shots directly.
Choosing a shot count. From the jobs page, a signed-in user can submit a named job: choose a backend from the list, paste OpenQASM, choose a shot count, and submit. The shot count is simply a field on that form.
Reading the counts. A completed job's page shows the circuit text you submitted and a histogram of its measurement counts, so you can compare one run against another.
Without provider credentials, jobs run on Q-Bridge's built-in simulator, which is classical simulation. For a two-peak circuit like the Bell pair you will still see counts that differ a little from run to run, for the sampling reasons above. If you later send a job to a hardware backend, that is a bring-your-own-credentials arrangement: Q-Bridge does not hold provider credentials, and there is a separate walkthrough in bring-your-own-key job submission. For the simulator side, see running OpenQASM in the browser.
Limits that apply to your plan, including qubit limits, are on the pricing page. You can create an account on the Free plan.
A short experiment to build intuition
- Submit a Bell pair as a named job with a small shot count and look at the histogram. Note how uneven the two bars are.
- Submit the same circuit again with the same shot count. The bars will probably differ from the first run, even though the circuit has not changed.
- Submit it once more with a much larger shot count. The two bars should sit closer together, relative to the total.
- Change the circuit so one outcome is clearly more likely than the other and repeat. Notice how few shots it takes to see a large imbalance, and how many it takes to resolve a small one.
That small exercise teaches the main lesson of shots: a counts table is a sample, the sample has a resolution, and the shot count is how you choose that resolution.
Create a Q-Bridge account, submit a circuit as a named job with a shot count of your choice, and read the counts histogram on the job page.
Get started