Quantum Kickstart · Pre-course self-check

Ready for the Kickstart?

A readiness diagnostic, not an entrance exam. It tells you, and us, what to brush up before the first morning.

The Kickstart is hands-on from the first morning: every concept on the slides is followed by a short piece of code that you run and change yourself. That only works if your Python environment and a few basic Python and NumPy skills are in place before you arrive. No quantum knowledge is assumed.

Two parts. Part 1 is a working notebook plus seven questions on Python and NumPy; it decides whether the course will work for you. Part 2 is six questions on decorators, complex numbers and angles; it decides what you prepare. Work out each answer on paper first, then run the code if you want to check. Allow about 20 minutes for the questions. The notebook setup is a separate 15 to 25 minute installation described in a short PDF; installation issues may take longer.

Part 1 · Required

Can you run Python and NumPy?

A working notebook, three Python questions, four NumPy questions. If one of these is missing, the first morning will be frustrating; we agree on preparation together.

Part 2 · Prepare

What to prepare before day 1

One question on decorators, three on complex numbers, two on polar form and radians. Nothing here decides whether you can join; it tells you what to read or watch beforehand.

Read this first. Only Part 1 decides anything. Part 2 looks ahead at the bits that cause friction during the course; a gap there means “spend an hour on this before the course”, not “you are not ready for quantum computing”. A result like B 3/3 · C 4/4 · D 1/1 · E 2/3 · F 1/2 is a perfectly typical, well-prepared participant with one hour of preparation. Every wrong option is a mistake we see during the course, so the explanations after submitting are worth reading even for questions you got right.

Part 1

Can you run Python and NumPy?

A working notebook and seven questions. This is the only part that decides whether the course will work for you.

Part A — A working notebook

Required

The course is hands-on from the first minute, so the one thing we cannot work around is a laptop without a working Python environment. The installation is a 15 to 25 minute walkthrough in a five-page PDF: Python, a virtual environment, Qiskit and JupyterLab, with PennyLane, Cirq and the Session 5 libraries as an optional second step. Its test cell ends with a READY line; paste that line here.

Company laptop locked down? Use your private laptop. Everything installed is public open-source software from python.org and PyPI, nothing needs an account, and the course uses no corporate data of any kind. Bring the laptop the READY line came from.
Open the installation walkthrough (PDF, 5 pages) ↗

Part B — Python basics

Required

Three questions. For each one, decide what the code prints.

B1What does this print?

values = [3, 1, 4, 1, 5]
total = 0
for i, v in enumerate(values):
    if i % 2 == 0:
        total += v
print(total, len(values) / 2)

B2A quantum computer returns its results as a dictionary of bitstrings and how often each one was observed. What does this print?

counts = {"000": 1012, "011": 988, "101": 4001, "110": 1999}
best = max(counts, key=counts.get)
print(best, int(best, 2), sum(counts.values()))

B3What does this print?

def scale(xs, factor=2):
    return [x * factor for x in xs if x > 1]

out = scale([1, 2, 3], 3)
print(f"{out} -> {sum(out):.1f}")

Part C — NumPy: vectors and matrices

Required

Four questions; np is numpy throughout. A qubit state is a vector, a gate is a matrix, and applying a gate is a matrix product.

C1Two products that look alike and are not.

A = np.array([[1, 2], [3, 4]])
B = np.array([[0, 1], [1, 0]])
print(A * B)
print(A @ B)

C2A matrix applied to a vector, then applied twice.

M = np.array([[1, 1], [1, -1]])
v = np.array([1, 0])
print(M @ v, M @ M @ v)

C3Order matters. Z flips the sign of the second component; S swaps the two components.

Z = np.array([[1, 0], [0, -1]])
S = np.array([[0, 1], [1, 0]])
v = np.array([1, 0])
print(S @ Z @ v)
print(Z @ S @ v)

C4Transpose, identity and length.

A = np.array([[1, 2], [3, 4]])
I = np.eye(2)
v = np.array([3, 4])
print(A.T[0, 1], np.allclose(A @ I, A), np.linalg.norm(v))

Part 2

What to prepare before day 1

Six short questions on decorators, complex numbers and angles. Nothing here decides whether you can join; it decides what you prepare. We strongly recommend understanding these questions before the course, with the videos and material linked in the result or your own LLM-assisted brush-up, so that the mornings can be spent on quantum computing rather than on catching up.

Prefer to refresh first? Two cheat sheets cover everything the course uses: vectors and matrices ↗ and complex numbers ↗. Reading them before answering is preparation, not cheating.

Part D — Reading a decorator

Prepare

One question. Quantum frameworks such as PennyLane mark a function as a quantum circuit by writing @qml.qnode(dev) above it. You never have to write a decorator in this course, but you will read them.

D1What does this print?

def normalise(fn):
    def wrapper(*args):
        v = fn(*args)
        return v / np.linalg.norm(v)
    return wrapper

@normalise
def state(a, b):
    return np.array([a, b], dtype=float)

print(state(3, 4))

Part E — Complex numbers

Prepare

Three questions. In Python the imaginary unit is written 1j. Qubit amplitudes are complex numbers, and probabilities come from their squared magnitude, so the difference between z² and |z|² matters from the first morning.

E1(1 + i)² equals

E21 / i equals

E3What does this print?

z = 3 + 4j
print(z * z.conjugate(), z**2, abs(z))

Part F — Polar form and radians

Prepare

Two questions. Every rotation gate in the course takes an angle in radians, and every phase is a complex number of the form eiφ.

F1z₁ = 2eiπ/4 and z₂ = 3eiπ/4. Then z₁·z₂ equals

F2What does this print?

theta = np.pi / 2
c, s = round(np.cos(theta / 2), 3), round(np.sin(theta / 2), 3)
print(c, s, np.angle(1j) / np.pi)

Your result

0 of 13 questions answered, no READY line yet. You can submit at any time; unanswered questions count as wrong, and you can change answers and submit again.

Showing the result sends an anonymous summary to qubit-lab.ch: your answers, scores and verdict, browser, language, time zone and approximate location. No name and no e-mail; those are only sent if you choose to below.

Not required, in case you were wondering

Physics. Quantum mechanics. Bra-ket notation (the course introduces it and the handout has a dictionary). Probability theory beyond “probabilities add up to 1”. Writing your own classes. Machine learning (Session 5 uses scikit-learn as a black box). Any cloud account or hardware access.