Self-Assessment Quiz: Programming Quantum Computers with Qiskit

Twenty questions on circuit construction, simulation, transpilation, primitives, and running on real hardware. All questions target current Qiskit conventions (1.x/2.x). Aim for 16+.


Question 1

QuantumCircuit(3, 3) creates:

A) 3 qubits only B) 3 qubits and 3 classical bits C) 6 qubits D) 3 circuits

Question 2

Qiskit's bit ordering in measurement result strings is:

A) Big-endian (qubit 0 leftmost) B) Little-endian (qubit 0 rightmost) C) Alphabetical D) Undefined

Question 3

A result key of '011' on a 3-qubit circuit means:

A) $q_0=0, q_1=1, q_2=1$ B) $q_0=1, q_1=1, q_2=0$ C) All qubits are 0 D) The circuit failed

Question 4

The correct modern import for a local simulator is:

A) from qiskit import Aer B) from qiskit_aer import AerSimulator C) from qiskit import BasicAer D) from qiskit.providers import Simulator

Question 5

qiskit.execute() in current Qiskit:

A) Is the recommended entry point B) Has been removed — use backend.run() or a primitive C) Only works on hardware D) Requires an API token

Question 6

Before running on hardware, a circuit must be transpiled because:

A) It reduces shot count B) It maps to the backend's native gates and connectivity C) It encrypts the circuit D) It is optional and cosmetic

Question 7

transpile(qc, backend, optimization_level=3) compared to level 1:

A) Runs faster but produces worse circuits B) Generally produces fewer two-qubit gates at higher compile cost C) Produces identical output D) Disables routing

Question 8

The Sampler primitive returns:

A) Expectation values B) Quasi-probability distributions / bitstring counts C) The state vector D) The unitary matrix

Question 9

The Estimator primitive returns:

A) Bitstring counts B) Expectation values of supplied observables C) Circuit depth D) Calibration data

Question 10

An observable such as $Z_0Z_1$ is expressed in Qiskit as:

A) "ZZ" via SparsePauliOp B) A QuantumCircuit C) A NumPy array only D) A string of 0s and 1s

Question 11

Statevector.from_instruction(qc) requires:

A) A circuit with measurements B) A circuit without measurements C) A hardware backend D) An API token

Question 12

Increasing shots from 1,024 to 4,096 reduces statistical error by roughly:

A) 4× B) 2× C) 16× D) No change

Question 13

qc.barrier():

A) Adds a gate B) Blocks compiler optimization across that point C) Measures all qubits D) Resets the circuit

Question 14

A "fake" backend such as FakeBrisbane is used for:

A) Running on real hardware B) Local simulation with a real device's coupling map and noise model C) Encrypting circuits D) Generating random numbers

Question 15

Circuits submitted to hardware must be in ISA form, meaning:

A) Written in assembly B) Expressed only in the backend's native instructions and connectivity C) Under 100 gates D) Measured in every basis

Question 16

True or false: A circuit that works on AerSimulator will produce the same distribution on hardware.

Question 17

True or false: qc.draw() output ordering matches the result bitstring ordering.

Question 18

True or false: Transpilation with optimization_level=3 is deterministic by default.

Question 19

Short answer. Your simulator gives {'00': 512, '11': 512} and hardware gives {'00': 480, '01': 30, '10': 34, '11': 480}. Explain the difference and how you would attribute it.

Question 20

Short answer. Why does running the same circuit on the same backend a day later sometimes give measurably different fidelity?


Answer Key

Q Ans Note
1 B Two registers: quantum and classical. Measurement results land in the classical one.
2 B Little-endian: qubit 0 is the rightmost character. This is the single most common source of confusion for newcomers and of mirrored results in ported code.
3 B Read right to left: the rightmost character is $q_0=1$, then $q_1=1$, then $q_2=0$. Answer A is the trap — it reads the string left to right, which is the intuitive but wrong direction in Qiskit.
4 B qiskit.Aer and BasicAer were removed in Qiskit 1.0; the simulator lives in the separate qiskit-aer package.
5 B Removed in 1.0. Code using it predates 2024.
6 B Hardware has a fixed native gate set and a sparse coupling map; transpilation is what makes an abstract circuit executable.
7 B Higher levels do more optimization passes and better routing, at greater compile time.
8 B Sampler = distributions; Estimator = expectation values. Choosing the right one saves a lot of post-processing.
9 B Directly returns $\langle O\rangle$, handling basis changes internally.
10 A SparsePauliOp("ZZ") — the standard representation for Hamiltonians and observables.
11 B Measurement is non-unitary, so a statevector cannot be extracted past it.
12 B $1/\sqrt N$: 4× the shots gives 2× the precision.
13 B A compiler directive with no physical effect.
14 B Fake backends carry a snapshot of a real device's properties — the best way to predict hardware behavior locally.
15 B Instruction Set Architecture form. Runtime primitives reject non-ISA circuits rather than silently transpiling them.
16 False Hardware adds gate error, decoherence, readout error, and routing overhead. Matching the simulator is the exception, not the rule.
17 False draw() puts qubit 0 on the top wire, while result strings put qubit 0 on the right. The two orderings are mirror images — a reliable source of misread results.
18 False Level 3 uses stochastic routing passes; pass seed_transpiler for reproducibility. Benchmarks without a fixed seed are not reproducible.
19 The hardware run shows ~7.8% in the "forbidden" 01 and 11 outcomes. Attribute by measuring separately: readout error via calibration circuits (Ch. 4), two-qubit gate error via randomized benchmarking, and decoherence via the circuit's duration against $T_2$. Typically readout dominates for a shallow Bell circuit. Do not attribute by assumption — measure each contribution.
20 Superconducting devices are recalibrated periodically and drift between calibrations: qubit frequencies shift, gate amplitudes go slightly stale, and $T_1/T_2$ fluctuate substantially day to day. Backends publish per-qubit error rates with a timestamp for exactly this reason. Any fidelity claim is implicitly "as of a given calibration," and comparing results across days without checking properties is a common experimental error.