Hands-on lab · 2 steps
HHL on a 2×2 system
Solve for and with the HHL algorithm on four qubits: read the clock values produced by phase estimation, then choose the controlled- angles that divide each eigencomponent by its eigenvalue, so that post-selection yields .
Step 1: Clock values of the two eigenvalues
The matrix has eigenvalues and . Phase estimation with , and clock qubits writes the integer into the clock register. Enter the two clock values (in either order). Exact integers are expected (tolerance ).
Step 2: Eigenvalue inversion
The circuit is fixed: ancilla on qubit , clock on qubits (MSB) and (LSB), system on qubit starting in . It runs phase estimation (controlled- from qubit , controlled- from qubit , inverse QFT), the rotations and , and the exact inverse of phase estimation. Set the parameters and so that, conditioned on ancilla and clock , the system qubit is . The grader requires fidelity and success probability . Use : the rotation for clock value must map .