qcmet.benchmarks.OverUnderRotationAngle#
- class qcmet.benchmarks.OverUnderRotationAngle(qubits=1, delta_m=20, gate=<class 'qiskit.circuit.library.standard_gates.sx.SXGate'>, m_max=200, num_gates_for_id=4, save_path=None)[source]#
Benchmark to estimate coherent over-/under-rotation on one qubit.
This benchmark generates a family of pseudoidentity circuits of length m, measures the probability of state |0⟩ vs m, and fits the decay and oscillation to extract the rotation-angle error per gate. The fit model is
prob_0(m) = a + b*e^(–i*decay_rate*m)·cos(m*theta_err + phase)
- experiment_data#
Populated by BaseBenchmark after generate_circuits.
- Type:
pd.DataFrame
- __init__(qubits=1, delta_m=20, gate=<class 'qiskit.circuit.library.standard_gates.sx.SXGate'>, m_max=200, num_gates_for_id=4, save_path=None)[source]#
Initialize the OverUnderRotationAngle benchmark.
- Parameters:
delta_m (int) – Step size in repeat count m between pseudoidentity circuits.
m_max (int) – Maximum number of repeats (inclusive).
qubits (int | List[int]) – The number of qubits as either a list of qubit indices or int specifying number of qubits.
gate (Gate) – Gate to measure over-under rotation
num_gates_for_id (int) – Number of SX gates in each repeated pseudoidentity.
save_path (str | Path | FileManager | None, optional) – Directory path to save results. Defaults to None.
Methods
__init__([qubits, delta_m, gate, m_max, ...])Initialize the OverUnderRotationAngle benchmark.
analyze()Analyze measurements to return benchmark results.
fit_func(m, a, b, decay_rate, theta_err, phase)Model function for fitting prob_0 vs m.
generate_circuits()Generate benchmark circuits, user facing.
has_plotting()Check if _plot function is implemented in benchmark.
load_circuit_measurements(circuit_measurements)Load measurement counts into the experiment_data DataFrame.
measurements_to_probabilities()Convert raw measurement counts to normalized probabilities.
plot([axes])Plot benchmark result, user facing.
run([device, num_shots, max_circs_per_job])Run benchmark.
save()Save benchmark current state.
set_save_path(save_path)Set benchmark save path if not set in class constructor.
Attributes
circuitsGets all benchmark circuits.
Getter for experiment_data dataframe.
num_qubitsNumber of qubits in this benchmark.