Skip to main contentIBM Quantum Documentation

EstimationProblem

qiskit.algorithms.EstimationProblem(state_preparation, objective_qubits, grover_operator=None, post_processing=None, is_good_state=None)

Bases: object (opens in a new tab)

The estimation problem is the input to amplitude estimation algorithm.

This class contains all problem-specific information required to run an amplitude estimation algorithm. That means, it minimally contains the state preparation and the specification of the good state. It can further hold some post processing on the estimation of the amplitude or a custom Grover operator.

Parameters


Attributes

grover_operator

Get the Q\mathcal{Q} operator, or Grover operator.

If the Grover operator is not set, we try to build it from the A\mathcal{A} operator and objective_qubits. This only works if objective_qubits is a list of integers.

Returns

The Grover operator, or None if neither the Grover operator nor the A\mathcal{A} operator is set.

has_good_state

Check whether an is_good_state function is set.

Some amplitude estimators, such as AmplitudeEstimation do not support a custom implementation of the is_good_state function, and can only handle the default.

Returns

True, if a custom is_good_state is set, otherwise returns False.

is_good_state

Checks whether a bitstring represents a good state.

Returns

Handle to the is_good_state callable.

objective_qubits

Get the criterion for a measurement outcome to be in a ‘good’ state.

Returns

The criterion as list of qubit indices.

post_processing

Apply post processing to the input value.

Returns

A handle to the post processing function. Acts as identity by default.

state_preparation

Get the A\mathcal{A} operator encoding the amplitude aa.

Returns

The A\mathcal{A} operator as QuantumCircuit.


Methods

rescale

rescale(scaling_factor)

Rescale the good state amplitude in the estimation problem.

Parameters

scaling_factor (float (opens in a new tab)) – The scaling factor in [0, 1].

Returns

A rescaled estimation problem.

Return type

EstimationProblem

Was this page helpful?