qiskit_noise_learning.analysis.LeastSquaresSolve
class qiskit_noise_learning.analysis.LeastSquaresSolve(non_negative: bool = True, solver: Literal['cvxpy', 'scipy'] | None = None)
Bases: ModelSolve
Solves for ModelData by least squares, with optional non-negativity constraints.
Minimizes over the design matrix A and target b. See ModelSolve for the general responsibility of a model solver in this library.
Parameters
- non_negative – Whether to constrain the solution to be non-negative (
x >= 0). Defaults toTrue. - solver – Either
"cvxpy"(default) or"scipy". If"cvxpy"is requested but not installed, warns and falls back to"scipy".
Raises
ValueError – If solver is not "cvxpy" or "scipy".
__init__
__init__(non_negative: bool = True, solver: Literal['cvxpy', 'scipy'] | None = None)
Methods
Kolumne „ 1 “ | Kolumne „ 2 “ |
|---|---|
__init__([non_negative, solver]) | |
run(fit) | Run this stage, returning a new Fit with the output level populated. |
Attributes
Kolumne „ 1 “ | Kolumne „ 2 “ |
|---|---|
input_level | The data level this stage reads. |
output_level | The data level this stage writes. |
War diese Seite hilfreich?
Melden Sie auf GitHub einen Fehler, einen Tippfehler oder fordern Sie Inhalte an.