qrunch.tools.minimizers.subset
Optimizer for a subset of parameters.
Classes
Minimizer that focuses on a subset of parameters while keeping the remaining parameters fixed. |
- class SubsetMinimizer
Bases:
MinimizerMinimizer that focuses on a subset of parameters while keeping the remaining parameters fixed.
- __init__(number_of_parameters_in_subset: int, minimizer: Minimizer | None = None) None
Initialize the SubsetMinimizer.
- Parameters:
number_of_parameters_in_subset (int) – The number of parameters to optimize.
minimizer (Minimizer | None) – The minimizer to use for the optimization
- Return type:
None
- minimize(function: Callable[[list[ndarray[Any, dtype[float64]]]], list[float]], initial_guess: ndarray[Any, dtype[float64]] | None, iteration: int | None, bounds: tuple[float, float] | list[tuple[float, float]] | None = None, circuit: Circuit | None = None, operator: HermitianPauliSum | None = None) MinimizerResult
Minimize the given function, by focusing on a subset of parameters.
- Parameters:
function (Callable[[list[ndarray[Any, dtype[float64]]]], list[float]]) – The function to minimize. Takes a numpy float as input and outputs a scalar value.
initial_guess (ndarray[Any, dtype[float64]] | None) – The initial guess for the values of the parameters.
iteration (int | None) – The current adaptive iteration of the VQE algorithm, if applicable.
bounds (tuple[float, float] | list[tuple[float, float]] | None) – The bounds for the parameters.
circuit (Circuit | None) – The parameterized circuit to be minimized.
operator (HermitianPauliSum | None) – The operator used in the expectation value.
- Return type: