diff --git a/qiskit_experiments/library/__init__.py b/qiskit_experiments/library/__init__.py index 8915f242eb..82e492c662 100644 --- a/qiskit_experiments/library/__init__.py +++ b/qiskit_experiments/library/__init__.py @@ -49,6 +49,7 @@ .. autosummary:: :toctree: ../stubs/ + :template: autosummary/experiment.rst ~characterization.T1 ~characterization.T2Ramsey diff --git a/qiskit_experiments/library/characterization/__init__.py b/qiskit_experiments/library/characterization/__init__.py index c7c1897ee4..8e5fe816af 100644 --- a/qiskit_experiments/library/characterization/__init__.py +++ b/qiskit_experiments/library/characterization/__init__.py @@ -21,6 +21,7 @@ =========== .. autosummary:: :toctree: ../stubs/ + :template: autosummary/experiment.rst T1 T2Ramsey @@ -32,6 +33,7 @@ .. autosummary:: :toctree: ../stubs/ + :template: autosummary/analysis.rst T1Analysis T2RamseyAnalysis diff --git a/qiskit_experiments/library/characterization/t1.py b/qiskit_experiments/library/characterization/t1.py index 30f601bf16..ed665ac3c2 100644 --- a/qiskit_experiments/library/characterization/t1.py +++ b/qiskit_experiments/library/characterization/t1.py @@ -28,20 +28,20 @@ class T1(BaseExperiment): r""" T1 experiment class - Experiment Options: - * delays: delay times of the experiments - * unit: Optional, unit of the delay times. Supported units are - 's', 'ms', 'us', 'ns', 'ps', 'dt'. + # section: overview + + Design and analyze experiments for estimating T\ :sub:`1` relaxation time of the qubit. + + Each experiment consists of the following steps: + + 1. Circuits generation: the circuits set the qubit in the excited state, + wait different time intervals, then measure the qubit. - Design and analyze experiments for estimating T\ :sub:`1` of the device. + 2. Backend execution: actually running the circuits on the device + (or simulator). - Each experiment consists of the following steps: - 1. Circuits generation: the circuits set the qubit in the excited state, - wait different time intervals, then measure the qubit. - 2. Backend execution: actually running the circuits on the device - (or simulator). - 3. Analysis of results: deduction of T\ :sub:`1`\ , based on the outcomes, - by fitting to an exponential curve. + 3. Analysis of results: deduction of T\ :sub:`1`\ , based on the outcomes, + by fitting to an exponential curve. """ @@ -49,6 +49,14 @@ class T1(BaseExperiment): @classmethod def _default_experiment_options(cls) -> Options: + """Default experiment options. + + Experiment Options: + delays (Iterable[float]): Delay times of the experiments. + unit (str): Unit of the delay times. Supported units are + 's', 'ms', 'us', 'ns', 'ps', 'dt'. + """ + return Options(delays=None, unit="s") def __init__( diff --git a/qiskit_experiments/library/characterization/t1_analysis.py b/qiskit_experiments/library/characterization/t1_analysis.py index 2f4bd343ac..e70ff00042 100644 --- a/qiskit_experiments/library/characterization/t1_analysis.py +++ b/qiskit_experiments/library/characterization/t1_analysis.py @@ -31,26 +31,36 @@ class T1Analysis(BaseAnalysis): r"""A class to analyze T1 experiments. - Fit Model + # section: fit_model The fit is based on the following decay function. .. math:: F(x) = a e^{-x/t1} + b - Fit Parameters - - :math:`amplitude`: Height of the decay curve - - :math:`offset`: Base line of the decay curve - - :math:`t1`: This is the fit parameter of main interest + # section: fit_parameters + defpar a: + desc: Height of the decay curve. + init_guess: Determined by :math:`(y_0 - b)`. - Initial Guesses - - :math:`amplitude\_guess`: Determined by :math:`(y_0 - offset\_guess)` - - :math:`offset\_guess`: Determined by the last :math:`y` - - :math:`t1\_guess`: Determined by the mean of the data points + defpar b: + desc: Base line of the decay curve. + init_guess: Determined by the last :math:`y`. + + defpar t1: + desc: This is the fit parameter of main interest. + init_guess: Determined by the mean of the data points. """ @classmethod def _default_options(cls): + """Default analysis options + Analysis Options: + t1_guess (float): Initial guess of T1. + amplitude_guess (float): Initial guess of the amplitude. + offset_guess (float): Initial guess of the offset. + """ + return Options( t1_guess=None, amplitude_guess=None,