For each trial, prepare and then measure a random computational basis
bitstring on qubits using gates in parallel.
Returns a SingleQubitReadoutCalibrationResult which can be used to
compute readout errors for each qubit.
The number of measurement repetitions to perform for
each trial.
trials
The number of bitstrings to prepare.
trials_per_batch
If provided, split the experiment into batches
with this number of trials in each batch.
bit_strings
Optional numpy array of shape (trials, qubits) where the
first dimension is the number of the trial and the second
dimension is the qubit (ordered by the qubit order from
the qubits parameter). Each value should be a 0 or 1 which
specifies which state the qubit should be prepared into during
that trial. If not provided, the function will generate random
bit strings for you.
Returns
A SingleQubitReadoutCalibrationResult storing the readout error
probabilities as well as the number of repetitions used to estimate
the probabilities. Also stores a timestamp indicating the time when
data was finished being collected from the sampler. Note that,
if there did not exist a trial where a given qubit was set to |0〉,
the zero-state error will be set to nan (not a number). Likewise
for qubits with no |1〉trial and one-state error.
Raises
ValueError
If the number of trials, repetitions, or trials_per batch is
negative, or if bit_strings is not a numpy array or of the wrong
shape.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-08 UTC."],[],[]]