English
Languages
English
Shortcuts



GroverOptimizationResult

class GroverOptimizationResult(x, fval, variables, operation_counts, n_input_qubits, n_output_qubits, intermediate_fval, threshold, status, samples=None, raw_samples=None)[source]

Bases: qiskit_optimization.algorithms.optimization_algorithm.OptimizationResult

A result object for Grover Optimization methods.

Constructs a result object with the specific Grover properties.

Parameters
  • x (Union[List[float], ndarray]) – The solution of the problem

  • 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 (Optional[List[SolutionSample]]) – the x values, the objective function value of the original problem, the probability, and the status of sampling.

  • raw_samples (Optional[List[SolutionSample]]) – the x values of the QUBO, the objective function value of the minimization QUBO, and the probability of sampling.

Attributes

intermediate_fval

Getter of the intermediate fval

n_input_qubits

Getter of n_input_qubits

n_output_qubits

Getter of n_output_qubits

operation_counts

Get the operation counts.

raw_samples

Returns the list of raw solution samples of GroverOptimizer.

threshold

Getter of the threshold of Grover algorithm.

Methods