By the end of this lesson, you should be able to:
- Describe a parameterized quantum circuit.
- Connect expectation values to an optimization objective.
- Explain the hybrid quantum-classical training loop.
A trainable quantum circuit
A variational quantum circuit contains parameterized gates whose angles are adjusted by an optimization procedure. A common workflow is:
\[\text{encode data}\rightarrow U(\theta)\rightarrow\text{measure observable}\rightarrow\text{loss}\rightarrow\text{update }\theta.\]
Hybrid computation
The quantum processor evaluates a circuit and returns measurement statistics or expectation values. A classical optimizer uses those values to propose new parameters. The cycle repeats until a stopping condition is reached.
Why this matters for QML
Variational circuits form the core of many near-term quantum machine-learning models, including variational classifiers and quantum neural-network architectures. Their practical behavior depends on circuit design, data encoding, noise, measurement cost, and optimization geometry.
# Conceptual Qiskit-style pseudocode
for step in range(steps):
value = evaluate_quantum_circuit(theta, x)
loss = objective(value, y)
theta = optimizer.update(theta, loss)
What should stay with you
- Variational circuits expose trainable parameters.
- Quantum measurements provide objective estimates.
- A classical optimizer closes the hybrid learning loop.
In a variational quantum algorithm, what typically updates the circuit parameters?
A classical optimizer uses measured objective values (and sometimes gradients) to propose new circuit parameters.