Skip to content

Commit 2fc0d18

Browse files
committed
add mod docs
1 parent 4f73766 commit 2fc0d18

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

qiskit_experiments/curve_analysis/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@
8383
8484
For multi-objective optimization, i.e. if you have more than two curves that you
8585
want to optimize simultaneously, you can create a list consisting of multiple curve entries.
86+
In this case, the curves defined in the series definition form a single composite function
87+
and the analysis solves the optimization problem:
88+
89+
.. math::
90+
91+
\Theta_{\mbox{opt}} = \arg\min_\Theta \sum_i \sigma_i^{-2} (f(x_i, \Theta) - y_i)^2
92+
93+
where the curve fit will find the parameters :math:`\Theta` that simultaneously minimize
94+
the chi-squared values of all defined sub curves. Here is an example:
8695
8796
.. code-block:: python3
8897
@@ -235,7 +244,7 @@ class AnalysisB(CurveAnalysis):
235244
however, here we are providing a unique ``group`` value to each series definition.
236245
In this configuration, the parameters ``[p0, p1, p2, p3]`` are not shared among
237246
underlying curve fittings, thus we will get two fit parameter sets as a result.
238-
This means the ``p*`` value may change between curves.
247+
This means any fit parameter value may change between curves.
239248
The parameters can be distinguished by the ``group`` value passed to the result metadata.
240249
241250
This is identical to running individual ``my_experiment1`` and ``my_experiment2`` as a

qiskit_experiments/curve_analysis/curve_analysis.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,10 @@ def _generate_fit_guesses(self, user_opt: FitOptions) -> Union[FitOptions, List[
382382
def _format_data(self, data: CurveData) -> CurveData:
383383
"""An optional subroutine to perform data pre-processing.
384384
385+
.. note::
386+
387+
The data returned by this method should have the label "fit_ready".
388+
385389
Returns:
386390
Formatted CurveData instance.
387391
"""

0 commit comments

Comments
 (0)