Hands-on lab · 2 steps
The Fubini–Study metric and one natural-gradient step
Compute the Fubini–Study metric of the single-qubit model at , then use it to take one quantum-natural-gradient step on the loss and compare it with the vanilla gradient step.
Step 1: The metric tensor at θ = π/3
The model state is prepared by the circuit followed by on one qubit,
Its Fubini–Study metric is the real symmetric matrix
Enter , and at (the metric does not depend on ). Each value is graded with absolute tolerance ; exact expressions such as sin(pi/3)^2/4 are accepted.
Step 2: One natural-gradient step on L = ⟨Z⟩
Take the loss for the same model. Starting from , perform one quantum-natural-gradient step with learning rate and no regularisation,
where is the metric of the previous step and its (pseudo-)inverse. Enter and . Each value is graded with absolute tolerance ; exact expressions such as pi/3+0.2*sqrt(3) are accepted.