qcmet.benchmarks.T1#

class qcmet.benchmarks.T1(qubit_index=0, num_idle_gates_per_circ=None, delay=None, save_path=None)[source]#

Benchmark class for estimating the T1 relaxation time of a qubit using idle gate sequences.

config#

Configuration dictionary containing the number of idle gates per circuit.

Type:

dict

fit_result#

Stores the results of the exponential fit.

Type:

dict

success#

Indicates whether the curve fitting was successful.

Type:

bool

__init__(qubit_index=0, num_idle_gates_per_circ=None, delay=None, save_path=None)[source]#

Initialize the T1 benchmark.

The benchmark can be specified with a range of idle gates or range of delay gates. The benchmark defaults to num_idle_gates for specifying the delay times.

Parameters:
  • qubit_index (int, optional) – The qubit index for routing. Defaults to 0.

  • num_idle_gates_per_circ (npt.ArrayLike, optional) – Sequence of idle gate counts to use in circuits. Defaults to np.arange(1, 5000, 500).

  • delay (npt.ArrayLike, optional) – Sequence of delay gates to use in circuits. This is for alternate method to the idle_gates approach. Do not set an argument for num_idle_gates_per_circ for this approach. Units are in microseconds.

  • save_path (str | Path | FileManager | None, optional) – Directory path to save results. Defaults to None.

Raises:

ValueError – If num_idle_gates_per_circ and delay has been specified.

Methods

__init__([qubit_index, ...])

Initialize the T1 benchmark.

analyze()

Analyze measurements to return benchmark results.

exp_func(x, amp, dr)

Exponential decay function used to fit the T1 relaxation curve.

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

circuits

Gets all benchmark circuits.

experiment_data

Getter for experiment_data dataframe.

num_qubits

Number of qubits in this benchmark.

static exp_func(x, amp, dr)[source]#

Exponential decay function used to fit the T1 relaxation curve.

Parameters:
  • x (float or array-like) – Independent variable (number of idle gates or delay duration).

  • amp (float) – Amplitude of the exponential decay.

  • dr (float) – Decay rate parameter, proportional to T1.

Returns:

Computed exponential decay values.

Return type:

float or array-like