Skip to main content
IBM Quantum Platform
Informationen zur Übersetzung

In Kürze folgen für diese Seite weitere Übersetzungen in andere Sprachen.

qiskit_noise_learning.analysis.LeastSquaresSolve

class qiskit_noise_learning.analysis.LeastSquaresSolve(non_negative: bool = True, solver: Literal['cvxpy', 'scipy'] | None = None)

GitHub

Bases: ModelSolve

Solves for ModelData by least squares, with optional non-negativity constraints.

Minimizes ∥Ax−b∥22\|A x - b\|_2^2 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 to True.
  • 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_levelThe data level this stage reads.
output_levelThe data level this stage writes.
War diese Seite hilfreich?
Melden Sie auf GitHub einen Fehler, einen Tippfehler oder fordern Sie Inhalte an.