GroverOptimizationResult#
- class GroverOptimizationResult(x, fval, variables, operation_counts, n_input_qubits, n_output_qubits, intermediate_fval, threshold, status, samples=None, raw_samples=None)[fuente]#
Bases:
OptimizationResult
A result object for Grover Optimization methods.
Constructs a result object with the specific Grover properties.
- Parámetros:
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.
- Devuelve:
The function value corresponding to the objective function value found in the optimization.
- intermediate_fval#
Getter of the intermediate fval
- Devuelve:
The intermediate value of fval before interpret.
- n_input_qubits#
Getter of n_input_qubits
- Devuelve:
The number of qubits used to represent the input.
- n_output_qubits#
Getter of n_output_qubits
- Devuelve:
The number of qubits used to represent the output.
- operation_counts#
Get the operation counts.
- Devuelve:
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.
- Devuelve:
Additional result information of the optimization algorithm.
- raw_samples#
Returns the list of raw solution samples of
GroverOptimizer
.- Devuelve:
The list of raw solution samples of
GroverOptimizer
.
- samples#
Returns the list of solution samples
- Devuelve:
The list of solution samples.
- status#
Returns the termination status of the optimization algorithm.
- Devuelve:
The termination status of the algorithm.
- threshold#
Getter of the threshold of Grover algorithm.
- Devuelve:
The threshold of Grover algorithm.
- variable_names#
Returns the list of variable names of the optimization problem.
- Devuelve:
The list of variable names of the optimization problem.
- variables#
Returns the list of variables of the optimization problem.
- Devuelve:
The list of variables.
- variables_dict#
Returns the variable values as a dictionary of the variable name and corresponding value.
- Devuelve:
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.
- Devuelve:
The variable values found in the optimization.
Methods
- get_correlations()#
Get <Zi x Zj> correlation matrix from the samples.
- Devuelve:
A correlation matrix.
- Tipo del valor devuelto: