QuantumCore

Hands-on lab · 1 step

Rabi evolution as a rotation

Solve the Schrödinger equation for H=ω2XH=\tfrac{\omega}{2}X (with ℏ=1\hbar=1): U(t)=e−iHt=e−i(ωt/2)X=RX(ωt)U(t)=e^{-iHt}=e^{-i(\omega t/2)X}=R_X(\omega t). Set the rotation angle for ωt=π/2\omega t=\pi/2 and reproduce the exact state, phases included.

0/1 step passedBest score 0/100

Step 1: Set the evolution angle

A qubit starts in ∣0⟩\lvert0\rangle and evolves under H=ω2XH=\tfrac{\omega}{2}X (units with ℏ=1\hbar=1) for a time tt with ωt=π/2\omega t=\pi/2. The circuit contains one rotation RX(wt)R_X(\texttt{wt}); set the parameter wt\texttt{wt} so that the circuit implements U(t)=e−iHtU(t)=e^{-iHt} exactly.

Recall RX(α)=e−iαX/2=cos⁡α2 I−isin⁡α2 XR_X(\alpha)=e^{-i\alpha X/2}=\cos\tfrac\alpha2\,I-i\sin\tfrac\alpha2\,X, valid because X2=IX^2=I. The grader compares the final statevector to the exact solution with tolerance ∥ψ−ψtarget∥2≤10−6\lVert\psi-\psi_{\text{target}}\rVert_2\le10^{-6}.

  • 1 qubit
  • allowed gates: RX
  • at most 1 gate
  • no measurements
  • free parameters: wt

One gate per line or separated by ;, e.g. H(0); CNOT(0,1); RY(1, pi/3); measure(1 -> 0). Qubit 0 is the top wire (most significant bit); controls come first. # starts a comment.

Measure into a classical bit with measure(q -> c); apply a gate only when a bit is set with X(2) if c1==1 (several bits, first = most significant: if c[0,1]==3).

Parameters
= 0
Circuit diagram of your answerRX(wt) on q0q0RX(wt)
Statevector amplitudes
BasisAmplitude α|α|Phase arg αProbability
|0⟩1
1.0000
0
100.00%
1 basis state with zero amplitude hidden