Self-Assessment Quiz: The Quantum Programming Landscape
Twenty questions on the map of the territory. Aim for 16 or more before moving to Chapter 2. Answers and a topic map follow the questions — work the whole quiz first.
Question 1
What does a quantum computer return when you run a program on it? - A. A single classical value, like a classical program - B. A quantum state you can inspect directly - C. A distribution over bitstrings, sampled by repeated execution - D. A probability amplitude for each possible answer
Question 2
The repeated executions of a quantum circuit are called: - A. iterations - B. shots - C. epochs - D. trials
Question 3
Which of these is NOT one of the five major quantum programming frameworks covered in this book? - A. Qiskit - B. Cirq - C. TensorFlow Quantum - D. PennyLane
Question 4
OpenQASM is best described as: - A. a sixth quantum programming framework - B. a quantum assembly language and interchange format - C. IBM's proprietary circuit format - D. a quantum simulator
Question 5
Which framework is built around the idea that a quantum circuit is a differentiable function? - A. Cirq - B. Q# - C. PennyLane - D. Amazon Braket
Question 6
Which framework is the only purpose-built quantum programming language rather than a library embedded in a host language? - A. Qiskit - B. Q# - C. Cirq - D. OpenQASM
Question 7
Cirq's Moment abstraction exists primarily to make which aspect of a program explicit?
- A. error rates
- B. qubit count
- C. simultaneity and timing
- D. measurement basis
Question 8
Amazon Braket's distinctive value proposition is: - A. the fastest simulator - B. access to multiple hardware technologies through one SDK - C. the only framework with a type system - D. free unlimited hardware access
Question 9
Which function was removed in Qiskit 1.0, breaking most pre-2024 tutorials?
- A. QuantumCircuit()
- B. transpile()
- C. execute()
- D. measure()
Question 10
How many complex amplitudes describe the state of an $n$-qubit system? - A. $n$ - B. $2n$ - C. $n^2$ - D. $2^n$
Question 11
Approximately where does exact statevector simulation on classical hardware become infeasible? - A. around 10 qubits - B. around 20 qubits - C. around 40 to 50 qubits - D. around 500 qubits
Question 12
The no-cloning theorem prevents which classical programming technique? - A. recursion - B. saving a state and restoring it later - C. looping - D. type checking
Question 13
Why is majority-vote error correction unavailable in quantum computing? - A. It is too slow - B. It requires copying an unknown quantum state, which no-cloning forbids - C. Quantum errors are always fatal - D. It requires measurement, which is not supported
Question 14
Measuring a qubit in superposition: - A. leaves the state unchanged - B. collapses it to a definite value, permanently - C. copies it to a classical register without disturbance - D. is impossible on real hardware
Question 15
Because measurement destroys the state, the classical debugging technique that becomes unavailable is: - A. setting a breakpoint - B. printing intermediate values - C. writing a unit test - D. reading a stack trace
Question 16
The process of rewriting your circuit into the gates a specific processor physically implements, mapped onto specific physical qubits, is called: - A. compilation to bytecode - B. transpilation - C. serialization - D. linking
Question 17
Why does transpilation matter more than classical compilation for correctness? - A. Transpilers are less reliable - B. Every added gate adds error and every added nanosecond adds decoherence, so a poor transpilation returns noise rather than a slow answer - C. Transpilation can change the algorithm - D. It does not; the analogy is exact
Question 18
NISQ stands for: - A. Networked Intermediate-Scale Quantum - B. Noisy Intermediate-Scale Quantum - C. Non-Interacting Superposition Qubits - D. Native Instruction Set for Quantum
Question 19
To estimate a probability to within $\pm\epsilon$, the number of shots required scales roughly as: - A. $1/\epsilon$ - B. $1/\epsilon^2$ - C. $\log(1/\epsilon)$ - D. $\epsilon^2$
Question 20
Which is the strongest near-term application of quantum computing according to this chapter? - A. breaking RSA encryption - B. combinatorial optimization - C. simulating small molecules - D. quantum machine learning on natural datasets
Answers
| # | Answer | Why |
|---|---|---|
| 1 | C | The output of every quantum program is a histogram built from repeated sampling. §1.1 |
| 2 | B | "Shots" is the term throughout the field and throughout this book. §1.1 |
| 3 | C | TensorFlow Quantum is a real library built on Cirq, but it is not one of the five this book covers. §1.2 |
| 4 | B | Assembly-level circuit representation and the interchange format between frameworks. §1.2 |
| 5 | C | PennyLane's QNode makes a circuit behave like a differentiable Python function. §1.2 |
| 6 | B | Q# has its own type system, syntax, and compiler; the others are libraries. §1.2 |
| 7 | C | A Moment is a time slice of simultaneous operations — timing is first-class in Cirq. §1.2 |
| 8 | B | Superconducting, trapped-ion, and neutral-atom devices through one interface. §1.2 |
| 9 | C | execute() was removed in Qiskit 1.0 (Feb 2024), along with QuantumCircuit.qasm(). §1.2 Version Note |
| 10 | D | One amplitude per bitstring, and there are $2^n$ bitstrings. §1.4 |
| 11 | C | 40 qubits is ~16 TiB; 50 is ~16 PiB. The wall sits in that range. §1.4 Math Aside |
| 12 | B | No operation copies an unknown quantum state, so there is no checkpoint/restore. §1.4 |
| 13 | B | Storing three copies requires cloning. QEC had to be invented from a different direction. §1.4 |
| 14 | B | Collapse is permanent, and the rest of the computation proceeds from the collapsed state. §1.4 |
| 15 | B | There is no print(qubit). Chapter 26 covers what replaces it. §1.4 |
| 16 | B | Qiskit's term; other frameworks say "compile." §1.1, §1.3 |
| 17 | B | A poorly transpiled circuit does not run slowly — it returns noise. §1.3 |
| 18 | B | Preskill's 2018 term: enough qubits to be interesting, far too much noise for error correction at scale. §1.5 |
| 19 | B | Ten times the precision costs a hundred times the shots. This governs near-term economics. §1.4 |
| 20 | C | Molecules are quantum systems, so the encoding is natural rather than forced. §1.5 |
Topic Map
| Questions | Topic | Section | If you missed these |
|---|---|---|---|
| 1, 2, 19 | Probabilistic output and shots | §1.1, §1.4 | Reread §1.1's "three questions" and §1.4 item 1 — this is the most important idea in the chapter |
| 3–8 | The five frameworks | §1.2 | Skim §1.2's code samples again; you do not need to know the frameworks yet, only who they are |
| 9 | API churn | §1.2 Version Note | Important practically: check the date on any quantum code you find |
| 10, 11 | The exponential wall | §1.4 Math Aside | Run the script in Exercise 1.9; the numbers land harder than the argument |
| 12, 13, 14, 15 | The four structural differences | §1.4 | Reread §1.4 in full. Every one of these has a chapter downstream of it |
| 16, 17 | Transpilation | §1.3 | Preview Chapter 10 |
| 18, 20 | Current capabilities | §1.5 | This is the section to be able to speak from; reread the Honest Assessment callout |
Score 16+: you have the map. Go to Chapter 2.
Score 12–15: reread §1.4 and §1.5. Those two sections carry the ideas the rest of the book depends on; the framework trivia in §1.2 matters much less right now.
Score under 12: reread the whole chapter, but do not stall here. This is a survey — much of it will land retroactively once you have run something. Go to Chapter 2, run a circuit on real hardware, and come back to this quiz afterward. It will read very differently.