qrunch.tools.minimizers.parameter_sorting_strategy.identity_sorting_strategy

Parameter sorting strategy that returns parameters in given order.

Classes

IdentitySortingStrategy

Identity sorting strategy that returns parameters in given order.

class IdentitySortingStrategy

Bases: ParameterSortingStrategy

Identity sorting strategy that returns parameters in given order.

Parameters:

seed – Optional seed for reproducibility. If None the global numpy RNG is used (non-deterministic across runs). If provided a dedicated Generator is instantiated.

__init__(*args, **kwargs)
sort_parameters(initial_guess: ndarray[Any, dtype[float64]], circuit: Circuit, operator: HermitianPauliSum | None) ParameterSortingStrategyResult

Sort the selected (tail) symbolic parameters randomly.

Parameters:
  • initial_guess (ndarray[Any, dtype[float64]]) – The initial guess array of length \(L\).

  • circuit (Circuit) – The parameterized quantum circuit corresponding to \(|\psi(\theta)\rangle\).

  • operator (HermitianPauliSum | None) – The Hermitian operator \(O\) used to compute expectation values: \(\langle \psi(\theta) | O | \psi(\theta) \rangle\).

Return type:

ParameterSortingStrategyResult