Title: CertiQ — C1000-179 / 7 · Retrieve and analyze the results of quantum circuits

Question: A SamplerV2 job whose circuit ended with measure_all() has completed, and you hold the returned result object. Which expression returns the measurement counts as a Python dict such as {'00': 512, '11': 512}?
# the executed circuit ended with qc.measure_all()
# result = sampler.run([isa_circuit]).result()
A.result[0].data.meas.get_counts()
B.result.get_counts()
C.result[0].get_counts()
D.result.quasi_dists[0]
Answer: Correct: A
A SamplerV2 job returns a PrimitiveResult: a sequence of one PubResult per PUB. Index the pub with result[0], reach its .data (a DataBin), select the register field (meas, auto-named by measure_all()), then call BitArray.get_counts().
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.PrimitiveResult
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.BitArray
Meta: s7-q010 · mcq · Difficulty 1/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: The circuit below is executed with a SamplerV2 primitive for 2000 shots. What do bits.num_shots and bits.num_bits print?
from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler
qc = QuantumCircuit(3)
qc.h(0); qc.cx(0, 1); qc.cx(1, 2)
qc.measure_all()
result = StatevectorSampler().run([qc], shots=2000).result()
bits = result[0].data.meas
print(bits.num_shots, bits.num_bits)
A.num_shots=3, num_bits=2000
B.num_shots=2000, num_bits=8
C.num_shots=2000, num_bits=3
D.num_shots=2000, num_bits=1
Answer: Correct: C
num_shots is the number of times the circuit was executed (2000), and num_bits is the number of classical bits in that register (3, one per measured qubit from measure_all()).
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.BitArray
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q011 · predict-output · Difficulty 1/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: A 10-qubit circuit ends with measure_all() and is sampled for 1024 shots. What is the shape of the raw packed array bits.array?
from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler
qc = QuantumCircuit(10)
for q in range(10):
    qc.h(q)
qc.measure_all()
result = StatevectorSampler().run([qc], shots=1024).result()
bits = result[0].data.meas
print(bits.array.shape)
A.(1024, 10)
B.(1024, 2)
C.(10, 1024)
D.(1024,)
Answer: Correct: B
A BitArray stores shots as bit-PACKED bytes: each shot's num_bits bits are packed into ceil(num_bits/8) uint8 columns. Ten bits pack into 2 bytes, so the array shape is (num_shots, 2) = (1024, 2). Use get_counts()/get_bitstrings() for readable output; num_bits (10) is separate from the byte width.
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.BitArray
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q012 · predict-output · Difficulty 3/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: The circuit measures into a ClassicalRegister named ans. After running it with a SamplerV2, which expression returns the counts for that register?
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
qr = QuantumRegister(2, "q")
ans = ClassicalRegister(2, "ans")
qc = QuantumCircuit(qr, ans)
qc.h(0); qc.cx(0, 1)
qc.measure(qr, ans)
# result = sampler.run([isa]).result()
A.result[0].data.meas.get_counts()
B.result[0].data.c.get_counts()
C.result[0].data.get_counts()
D.result[0].data.ans.get_counts()
Answer: Correct: D
The DataBin exposes one field per classical register, named after the register. Here the register is ans, so the BitArray lives at data.ans.
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.DataBin
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q013 · mcq · Difficulty 1/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: A 3-qubit circuit applies X to qubit 0 only, then measure_all(), and is sampled for 500 shots. What does get_counts() return?
from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler
qc = QuantumCircuit(3)
qc.x(0)
qc.measure_all()
result = StatevectorSampler().run([qc], shots=500).result()
print(result[0].data.meas.get_counts())
A.{'001': 500}
B.{'100': 500}
C.{'010': 500}
D.{'000': 500}
Answer: Correct: A
Qiskit uses little-endian bit ordering: qubit 0 is the RIGHTMOST character of the bitstring. Only qubit 0 is flipped, so every shot reads 001.
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.BitArray
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q014 · predict-output · Difficulty 2/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: You sample a 3-qubit GHZ circuit (outcomes are only 000 and 111), then postselect on all three qubits reading 1. What does kept.get_counts() contain?
from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler
qc = QuantumCircuit(3)
qc.h(0); qc.cx(0, 1); qc.cx(1, 2)
qc.measure_all()
bits = StatevectorSampler().run([qc], shots=1000).result()[0].data.meas
kept = bits.postselect([0, 1, 2], [1, 1, 1])
print(kept.get_counts())
A.Only the 000 outcomes survive: {'000': n}
B.Unchanged: {'000': a, '111': b}
C.Only the 111 outcomes survive: {'111': n}
D.Empty {} -- postselection removes every shot
Answer: Correct: C
postselect(indices, values) keeps only the shots whose measured bits at indices equal values, preserving num_bits. Requiring qubits [0,1,2] to be [1,1,1] retains exactly the 111 shots.
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.BitArray
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q015 · predict-output · Difficulty 2/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: From a BitArray of shots you want a NEW BitArray containing only the shots in which qubit 1 was measured as 0, keeping all bits. Which call does this?
# bits: a BitArray of measured shots (all bits retained)
A.bits.slice_bits([1])
B.bits.postselect([1], [0])
C.bits.slice_shots([0])
D.bits.get_counts()[0]
Answer: Correct: B
postselect(indices, values) filters SHOTS by the measured value at each index (here qubit 1 must equal 0) and returns a BitArray with the same num_bits.
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.BitArray
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q016 · mcq · Difficulty 2/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: A 3-qubit circuit applies X to qubit 0 (qubits 1 and 2 stay |0>), then measure_all(). From the resulting bits you call bits.slice_bits([2]). What does the sliced array's get_counts() return?
from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler
qc = QuantumCircuit(3)
qc.x(0)
qc.measure_all()
bits = StatevectorSampler().run([qc], shots=300).result()[0].data.meas
print(bits.slice_bits([2]).get_counts())
A.{'1': 300}
B.{'001': 300}
C.{'100': 300}
D.{'0': 300}
Answer: Correct: D
slice_bits([2]) keeps only bit index 2, which is qubit 2 (measured 0), and returns a 1-bit BitArray. Bit indices match qubit indices (little-endian), so index 2 is NOT the flipped qubit 0.
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.BitArray
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q017 · predict-output · Difficulty 3/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: You ran the same circuit in two separate SamplerV2 jobs and now hold two BitArrays, a and b, with equal num_bits. You want a single BitArray pooling ALL shots from both. Which call produces it?
from qiskit.primitives.containers import BitArray
# a, b: BitArrays with equal num_bits, from two jobs
A.BitArray.concatenate_shots([a, b])
B.BitArray.concatenate_bits([a, b])
C.a.get_counts() + b.get_counts()
D.a + b
Answer: Correct: A
concatenate_shots stacks the shot axes: the result has num_shots = a.num_shots + b.num_shots and unchanged num_bits -- exactly pooling repeated runs.
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.BitArray
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q018 · mcq · Difficulty 2/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: A SamplerV2 result's BitArray bits came from a 5-qubit circuit that measured only qubits 0,1,2 into a 3-bit register, run for 256 shots. Which statements are TRUE? (Select all that apply.)
# bits = result[0].data.<register>   # 3-bit register, 256 shots, 5-qubit circuit
A.bits.num_shots equals the number of times the circuit was executed (256)
B.len(bits.get_bitstrings()) equals bits.num_shots
C.bits.array.shape[1] equals bits.num_bits
D.bits.get_counts() values sum to bits.num_shots
E.bits.num_bits always equals the number of qubits in the circuit
Answer: Correct: A, B, D
num_shots counts executions (256). get_bitstrings() returns one string per shot, so its length equals num_shots, and get_counts() values sum to num_shots. num_bits is the width of the measured register (3), independent of the total qubit count (5) and of the packed byte width (array.shape[1] is ceil(num_bits/8)).
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.BitArray
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q019 · multi · Difficulty 3/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: An EstimatorV2 evaluates the observable ZZ on an ideal Bell state (H then CX). What does result[0].data.evs hold?
from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorEstimator
from qiskit.quantum_info import SparsePauliOp
qc = QuantumCircuit(2)
qc.h(0); qc.cx(0, 1)
obs = SparsePauliOp("ZZ")
result = StatevectorEstimator().run([(qc, obs)]).result()
print(result[0].data.evs)
A.{'00': 0.5, '11': 0.5} -- a counts-like dict
B.0.0 -- the observable averages to zero
C.1.0 -- a scalar expectation value
D.[0.5, 0.5] -- outcome probabilities
Answer: Correct: C
EstimatorV2 returns expectation values, not samples. The Bell state is a +1 eigenstate of ZZ, so <ZZ> = 1.0. The estimator DataBin exposes evs (and stds), never counts or probabilities.
References
- quantum.cloud.ibm.com/docs/api/qiskit/primitives
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q020 · predict-output · Difficulty 1/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: A one-parameter circuit is bound to four parameter values (array shape (4, 1)) and evaluated against a single observable by EstimatorV2. What is the shape of result[0].data.evs?
import numpy as np
from qiskit import QuantumCircuit
from qiskit.circuit import Parameter
from qiskit.primitives import StatevectorEstimator
from qiskit.quantum_info import SparsePauliOp
t = Parameter("t")
qc = QuantumCircuit(1); qc.ry(t, 0)
obs = SparsePauliOp("Z")
vals = np.array([[0.0], [np.pi/2], [np.pi], [3*np.pi/2]])  # shape (4, 1)
result = StatevectorEstimator().run([(qc, obs, vals)]).result()
print(result[0].data.evs.shape)
A.(4, 1)
B.(4,)
C.(1,)
D.() (a scalar)
Answer: Correct: B
The PUB broadcasts over the parameter array's leading shape. Four parameter sets against one observable give four expectation values, shape (4,). The trailing parameter axis (size 1) is consumed by binding and does not appear in the evs shape.
References
- quantum.cloud.ibm.com/docs/api/qiskit/primitives
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q021 · predict-output · Difficulty 3/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: You ran an EstimatorV2 job and hold result. Which expression gives the estimated expectation value(s)?
# result = estimator.run([(isa_circuit, observable)]).result()
A.result[0].data.meas.get_counts()
B.result[0].data.get_counts()
C.result[0].evs
D.result[0].data.evs
Answer: Correct: D
An estimator DataBin carries evs (expectation values) and stds (their standard errors). Access them via result[0].data.evs.
References
- quantum.cloud.ibm.com/docs/api/qiskit/primitives
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q022 · mcq · Difficulty 2/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: Two circuits are submitted in a single SamplerV2 call as two PUBs. What does len(result) return, and how do you access the second circuit's counts?
from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler
qc_a = QuantumCircuit(1); qc_a.x(0); qc_a.measure_all()
qc_b = QuantumCircuit(1); qc_b.measure_all()
result = StatevectorSampler().run([qc_a, qc_b], shots=100).result()
A.len(result) is 2; second counts via result[1].data.meas.get_counts()
B.len(result) is 1; both circuits share result[0]
C.len(result) is 2; second counts via result.data[1].meas.get_counts()
D.len(result) is 100 (one entry per shot)
Answer: Correct: A
A PrimitiveResult holds one PubResult per PUB, in input order. Two PUBs give len(result) == 2; the second circuit's data is at result[1].data.meas. Shots live inside each pub's BitArray, not as top-level entries.
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.PrimitiveResult
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q023 · predict-output · Difficulty 1/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: This snippet should print the measurement counts of a completed SamplerV2 job, but it raises an error. What is the fix?
from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler
qc = QuantumCircuit(2); qc.h(0); qc.cx(0, 1); qc.measure_all()
result = StatevectorSampler().run([qc], shots=1024).result()
counts = result.data.meas.get_counts()   # AttributeError
print(counts)
A.Use result.get_counts() -- PrimitiveResult exposes counts directly
B.Use result.data[0].meas.get_counts()
C.Index the PUB first: result[0].data.meas.get_counts()
D.Use result.quasi_dists[0]
Answer: Correct: C
result is a PrimitiveResult (a sequence of PubResults). You must select a pub with result[0] before reaching .data. PrimitiveResult itself has neither .data nor .get_counts nor V1's .quasi_dists.
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.PrimitiveResult
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
- quantum.cloud.ibm.com/docs/guides/save-jobs
Meta: s7-q024 · spot-bug · Difficulty 2/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: From the sampled bits of an ideal Bell state (H, CX, measure_all), you compute bits.expectation_values('ZZ'). What value results?
from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler
qc = QuantumCircuit(2); qc.h(0); qc.cx(0, 1); qc.measure_all()
bits = StatevectorSampler().run([qc], shots=1000).result()[0].data.meas
print(bits.expectation_values("ZZ"))
A.0.0
B.1.0
C.-1.0
D.0.5
Answer: Correct: B
BitArray.expectation_values assigns +/-1 per bit and averages over shots. In a Bell state every shot is 00 or 11, and both are +1 eigenvalues of ZZ (product of the two +/-1 bit values), so the average is exactly 1.0 regardless of the split.
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.BitArray
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q025 · predict-output · Difficulty 3/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: In an earlier session you ran a Sampler job and saved its ID string job_id. Your kernel has since restarted. Using a fresh QiskitRuntimeService() as service, how do you retrieve that job's results?
from qiskit_ibm_runtime import QiskitRuntimeService
service = QiskitRuntimeService()
job_id = "d762omnq1anc738d2cj0"   # saved earlier
# retrieve the results ...
A.service.result(job_id)
B.QiskitRuntimeService.get_result(job_id)
C.service.jobs(job_id).result()
D.service.job(job_id).result()
Answer: Correct: D
IBM Quantum stores every job's results server-side. service.job(job_id) re-hydrates the RuntimeJobV2; calling .result() returns its stored PrimitiveResult, so work survives a kernel restart.
References
- quantum.cloud.ibm.com/docs/guides/save-jobs
- quantum.cloud.ibm.com/docs/guides/monitor-job
Meta: s7-q026 · mcq · Difficulty 1/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: You want to review results from jobs you ran last week but did not record their IDs. Which approaches let you locate and retrieve those past jobs? (Select all that apply.)
A.Call service.jobs(...) with filters such as backend_name or created_after to list matching jobs
B.Iterate the returned jobs and call .result() on the one you want
C.Look up the job and its ID on the Workloads page of IBM Quantum Platform
D.Call service.job() with no arguments to get every past job at once
E.Nothing can be done -- results live only in local RAM and are lost on a kernel restart
Answer: Correct: A, B, C
service.jobs() returns your recent jobs and can be filtered by backend, creation date, or state; you then call .result() on the chosen job. The Workloads page lists every submission with its ID. Because IBM Quantum persists results server-side, a kernel restart does not lose them.
References
- quantum.cloud.ibm.com/docs/guides/save-jobs
- quantum.cloud.ibm.com/docs/guides/monitor-job
Meta: s7-q027 · multi · Difficulty 2/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: You submit a Sampler job on real hardware and immediately call job.result() on the next line. What happens?
job = sampler.run([isa_circuit])
result = job.result()   # called right after submitting
A.job.result() blocks until the job completes, then returns the PrimitiveResult
B.It raises immediately because the job is still queued; you must poll job.status() until DONE first
C.It returns whatever partial results have been collected so far
D.It returns None until you separately call job.wait()
Answer: Correct: A
job.result() is a BLOCKING call: it waits for the job to finish and then returns the stored result. You may independently call job.status() (returning states like QUEUED, RUNNING, DONE) to monitor progress, but you are not required to poll before calling result().
References
- quantum.cloud.ibm.com/docs/guides/monitor-job
- quantum.cloud.ibm.com/docs/guides/save-jobs
Meta: s7-q028 · mcq · Difficulty 2/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: A 3-qubit GHZ circuit (measure_all) is sampled. Its get_counts() returns {'000': a, '111': b}. What KEYS does bits.get_int_counts() use for those same outcomes?
from qiskit import QuantumCircuit
from qiskit.primitives import StatevectorSampler
qc = QuantumCircuit(3); qc.h(0); qc.cx(0, 1); qc.cx(1, 2); qc.measure_all()
bits = StatevectorSampler().run([qc], shots=800).result()[0].data.meas
print(bits.get_int_counts())
A.{0: a, 3: b}
B.{'000': a, '111': b} -- same string keys
C.{0: a, 7: b} -- each bitstring read as a binary integer
D.{0: a, 111: b} -- 111 kept as the number 111
Answer: Correct: C
get_int_counts() converts each measured bitstring to its integer value in binary: 000 -> 0 and 111 -> 7.
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.BitArray
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q029 · predict-output · Difficulty 1/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: Calling session.details() on a Runtime Session returns a dictionary. Which of the following are actual keys in that dictionary? (Select all that apply.)
details = session.details()
A.state
B.queue_position
C.accepting_jobs
D.shots
E.last_job_completed
F.results
Answer: Correct: A, C, E
session.details() reports session-level lifecycle and usage metadata: state (open/active/inactive/closed), accepting_jobs, last_job_started/last_job_completed, plus max_time, usage_time, mode, and timestamps. Per-job data (a queue position, shot count, or the results themselves) is NOT part of it.
References
- quantum.cloud.ibm.com/docs/api/qiskit-ibm-runtime/session#details
- quantum.cloud.ibm.com/docs/guides/monitor-job
Meta: s7-q030 · multi · Difficulty 2/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: You retrieved a result but don't remember the circuit's classical-register name, so result[0].data.meas fails. Which expression lists the register names available on the data bin so you can pick the right one?
# result = sampler.run([isa]).result()
db = result[0].data
A.db.registers
B.list(db.keys())
C.db.get_counts().keys()
D.db.num_bits
Answer: Correct: B
A DataBin behaves like a mapping of register-name -> BitArray. db.keys() enumerates the register-name fields, so you can see the correct name (e.g. ['ans']).
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.DataBin
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q031 · mcq · Difficulty 2/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: The circuit measures into a register named readout, but this analysis code raises an AttributeError. Which corrected expression works?
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit.primitives import StatevectorSampler
qr = QuantumRegister(2, "q")
readout = ClassicalRegister(2, "readout")
qc = QuantumCircuit(qr, readout)
qc.h(0); qc.cx(0, 1); qc.measure(qr, readout)
result = StatevectorSampler().run([qc], shots=512).result()
counts = result[0].data.meas.get_counts()   # AttributeError: no 'meas'
A.result[0].data.meas.get_counts()
B.result[0].data.c.get_counts()
C.result.data.readout.get_counts()
D.result[0].data.readout.get_counts()
Answer: Correct: D
The DataBin field is named after the classical register, here readout. meas is only auto-created by measure_all(), and c is only the default name for QuantumCircuit(n, m); the pub index [0] is still required.
References
- quantum.cloud.ibm.com/docs/api/qiskit/qiskit.primitives.DataBin
- quantum.cloud.ibm.com/docs/guides/primitive-input-output
Meta: s7-q032 · spot-bug · Difficulty 2/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.

Question: In a script using Qiskit SDK 2.x and qiskit-ibm-runtime, you want to wait for a submitted job to finish and then read its results. Which approach is correct?
job = sampler.run([isa_circuit])
# wait for completion, then read results
A.Call qiskit.tools.job_monitor(job) to block until it finishes
B.Loop on job.done() until it returns True, then call job.output()
C.Call job.result() -- it blocks until completion and returns the result; poll job.status() if you want progress
D.Call job.wait(), then job.get_counts()
Answer: Correct: C
job.result() is the blocking call that returns the PrimitiveResult; job.status() reports the state if you want to monitor progress. That is the supported pattern in the current runtime.
References
- quantum.cloud.ibm.com/docs/guides/monitor-job
- quantum.cloud.ibm.com/docs/guides/save-jobs
Meta: s7-q033 · mcq · Difficulty 2/3
AI-generated, execution-verified — CertiQ. Unofficial: not affiliated with, endorsed by, or sponsored by IBM.