NoOpMinimize¶
- class NoOpMinimize¶
Classical optimizer that evaluates the objective at a fixed set of parameters.
This optimizer does not search for better parameters. It evaluates the objective function exactly once at the parameter values provided via
parameters. Useful for benchmarking or reproducing results with known parameters.Assign an instance to
minimizeto use it.Methods
Initialize a NoOpMinimize optimizer.
Attributes
The fixed circuit parameter values to evaluate.
- __call__(func: Callable[[list[float]], float], num_parameters: int, *, dry_run: bool = False) NoOpMinimizeResult | None¶
Evaluate the objective at the fixed parameters.
- パラメータ:
- 戻り値:
The evaluation result, or
Noneif dry_run isTrue.- 戻り値の型:
NoOpMinimizeResult | None
- 例外:
ValueError -- If
parametersisNoneor has wrong length.
- __init__(parameters: Sequence[float] | None = None) None¶
Initialize a NoOpMinimize optimizer.
- パラメータ:
parameters (Sequence[float] | None) -- Fixed circuit parameter values to evaluate. Must be provided before calling the optimizer; passing
Nonedefers the error to call time.
- parameters¶
The fixed circuit parameter values to evaluate. Must be provided before calling the optimizer; passing
Nonedefers the error to call time.