Use ⟨X⟩=sinθcosϕ, ⟨Y⟩=sinθsinϕ, ⟨Z⟩=cosθ to prepare a qubit with ⟨Z⟩=21, ⟨X⟩=23, ⟨Y⟩=0.
0/1 step passedBest score 0/100
Step 1: Prepare the target expectations
Starting from ∣0⟩, use at most three gates from {RX,RY,RZ,H,S,X,Z} to prepare a state with
⟨Z⟩=21,⟨X⟩=23,⟨Y⟩=0.
Each expectation value is graded with absolute tolerance 10−6. Recall that for ∣ψ⟩=cos2θ∣0⟩+eiϕsin2θ∣1⟩ the Born rule gives ⟨A⟩=⟨ψ∣A∣ψ⟩=∑mmP(m), which evaluates to ⟨X⟩=sinθcosϕ, ⟨Y⟩=sinθsinϕ, ⟨Z⟩=cosθ.