GroverOptimizationResult#
- class GroverOptimizationResult(x, fval, variables, operation_counts, n_input_qubits, n_output_qubits, intermediate_fval, threshold, status, samples=None, raw_samples=None)[ソース]#
ベースクラス:
OptimizationResult
A result object for Grover Optimization methods.
Constructs a result object with the specific Grover properties.
- パラメータ:
fval (float) – The value of the objective function of the solution
variables (List[Variable]) – A list of variables defined in the problem
operation_counts (Dict[int, Dict[str, int]]) – The counts of each operation performed per iteration.
n_input_qubits (int) – The number of qubits used to represent the input.
n_output_qubits (int) – The number of qubits used to represent the output.
intermediate_fval (float) – The intermediate value of the objective function of the minimization qubo solution, that is expected to be consistent to
fval
.threshold (float) – The threshold of Grover algorithm.
status (OptimizationResultStatus) – the termination status of the optimization algorithm.
samples (List[SolutionSample] | None) – the x values, the objective function value of the original problem, the probability, and the status of sampling.
raw_samples (List[SolutionSample] | None) – the x values of the QUBO, the objective function value of the minimization QUBO, and the probability of sampling.
Attributes
- fval#
Returns the objective function value.
- 戻り値:
The function value corresponding to the objective function value found in the optimization.
- intermediate_fval#
Getter of the intermediate fval
- 戻り値:
The intermediate value of fval before interpret.
- n_input_qubits#
Getter of n_input_qubits
- 戻り値:
The number of qubits used to represent the input.
- n_output_qubits#
Getter of n_output_qubits
- 戻り値:
The number of qubits used to represent the output.
- operation_counts#
Get the operation counts.
- 戻り値:
The counts of each operation performed per iteration.
- raw_results#
Return the original results object from the optimization algorithm.
Currently a dump for any leftovers.
- 戻り値:
Additional result information of the optimization algorithm.
- raw_samples#
Returns the list of raw solution samples of
GroverOptimizer
.- 戻り値:
The list of raw solution samples of
GroverOptimizer
.
- samples#
Returns the list of solution samples
- 戻り値:
The list of solution samples.
- status#
Returns the termination status of the optimization algorithm.
- 戻り値:
The termination status of the algorithm.
- threshold#
Getter of the threshold of Grover algorithm.
- 戻り値:
The threshold of Grover algorithm.
- variable_names#
Returns the list of variable names of the optimization problem.
- 戻り値:
The list of variable names of the optimization problem.
- variables#
Returns the list of variables of the optimization problem.
- 戻り値:
The list of variables.
- variables_dict#
Returns the variable values as a dictionary of the variable name and corresponding value.
- 戻り値:
The variable values as a dictionary of the variable name and corresponding value.
- x#
Returns the variable values found in the optimization or None in case of FAILURE.
- 戻り値:
The variable values found in the optimization.
Methods
- get_correlations()#
Get <Zi x Zj> correlation matrix from the samples.
- 戻り値:
A correlation matrix.
- 戻り値の型: