Runs a Rabi oscillation experiment.

Rotates a qubit around the x-axis of the Bloch sphere by a sequence of Rabi angles evenly spaced between 0 and max_angle. For each rotation, repeat the circuit a number of times and measure the average probability of the qubit being in the |1> state.

sampler The quantum engine or simulator to run the circuits.
qubit The qubit under test.
max_angle The final Rabi angle in radians.
repetitions The number of repetitions of the circuit for each Rabi angle.
num_points The number of Rabi angles.

A RabiResult object that stores and plots the result.