QuantumCore

Hands-on lab · 2 steps

The Fubini–Study metric and one natural-gradient step

Compute the Fubini–Study metric of the single-qubit model ∣ψ(θ,ϕ)⟩=RZ(ϕ)RY(θ)∣0⟩\lvert\psi(\theta,\phi)\rangle=R_Z(\phi)R_Y(\theta)\lvert0\rangle at θ=π/3\theta=\pi/3, then use it to take one quantum-natural-gradient step on the loss L=⟨Z⟩L=\langle Z\rangle and compare it with the vanilla gradient step.

0/2 steps passedBest score 0/100

Step 1: The metric tensor at θ = π/3

The model state is prepared by the circuit RY(θ)R_Y(\theta) followed by RZ(ϕ)R_Z(\phi) on one qubit,

∣ψ(θ,ϕ)⟩=RZ(ϕ) RY(θ)∣0⟩,RP(t)=e−itP/2.\lvert\psi(\theta,\phi)\rangle=R_Z(\phi)\,R_Y(\theta)\lvert0\rangle,\qquad R_P(t)=e^{-itP/2}.

Its Fubini–Study metric is the real symmetric 2×22\times2 matrix

gij=Re[⟨∂iψ∣∂jψ⟩−⟨∂iψ∣ψ⟩⟨ψ∣∂jψ⟩],i,j∈{θ,ϕ}.g_{ij}=\mathrm{Re}\Big[\langle\partial_i\psi\vert\partial_j\psi\rangle-\langle\partial_i\psi\vert\psi\rangle\langle\psi\vert\partial_j\psi\rangle\Big],\qquad i,j\in\{\theta,\phi\}.

Enter gθθg_{\theta\theta}, gθϕg_{\theta\phi} and gϕϕg_{\phi\phi} at θ=π/3\theta=\pi/3 (the metric does not depend on ϕ\phi). Each value is graded with absolute tolerance 10−310^{-3}; exact expressions such as sin(pi/3)^2/4 are accepted.

Enter exact expressions or decimals, e.g. 1/sqrt(2), pi/3. Values must be real.

enter a value
enter a value
enter a value
Fill every field with a valid expression.

Step 2: One natural-gradient step on L = ⟨Z⟩

Take the loss L(θ,ϕ)=⟨ψ(θ,ϕ)∣Z∣ψ(θ,ϕ)⟩=cos⁡θL(\theta,\phi)=\langle\psi(\theta,\phi)\vert Z\vert\psi(\theta,\phi)\rangle=\cos\theta for the same model. Starting from (θ,ϕ)=(π/3, 0)(\theta,\phi)=(\pi/3,\,0), perform one quantum-natural-gradient step with learning rate η=0.1\eta=0.1 and no regularisation,

(θ′ϕ′)=(θϕ)−η g+ ∇L,\begin{pmatrix}\theta'\\\phi'\end{pmatrix}=\begin{pmatrix}\theta\\\phi\end{pmatrix}-\eta\,g^{+}\,\nabla L,

where gg is the metric of the previous step and g+g^{+} its (pseudo-)inverse. Enter θ′\theta' and ϕ′\phi'. Each value is graded with absolute tolerance 10−310^{-3}; exact expressions such as pi/3+0.2*sqrt(3) are accepted.

Enter exact expressions or decimals, e.g. 1/sqrt(2), pi/3. Values must be real.

enter a value
enter a value
Fill every field with a valid expression.