Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version

AmplificationProblem

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

GitHub(opens in a new tab)

Bases: object(opens in a new tab)

The amplification problem is the input to amplitude amplification algorithms, like Grover.

This class contains all problem-specific information required to run an amplitude amplification algorithm. It minimally contains the Grover operator. It can further hold some post processing on the optimal bitstring.

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.

is_good_state

Check whether a provided bitstring is a good state or not.

Returns

A callable that takes in a bitstring and returns True if the measurement is a good state, False otherwise.

objective_qubits

The indices of the objective qubits.

Returns

The indices of the objective qubits as list of integers.

oracle

Return the oracle.

Returns

The oracle.

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 state preparation operator A\mathcal{A}.

Returns

The A\mathcal{A} operator as QuantumCircuit.

Was this page helpful?
Report a bug or request content on GitHub.