Japanese
言語
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

EstimationProblem

class EstimationProblem(state_preparation, objective_qubits, grover_operator=None, post_processing=None, is_good_state=None)[ソース]

ベースクラス: object

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.

パラメータ
  • state_preparation – A circuit preparing the input state, referred to as \(\mathcal{A}\).

  • objective_qubits – A single qubit index or a list of qubit indices to specify which qubits to measure. The is_good_state function is applied on the bitstring of these objective qubits.

  • grover_operator – The Grover operator \(\mathcal{Q}\) used as unitary in the phase estimation circuit.

  • post_processing – A mapping applied to the result of the algorithm \(0 \leq a \leq 1\), usually used to map the estimate to a target interval. Defaults to the identity.

  • is_good_state – A function to check whether a string represents a good state. Defaults to all objective qubits being in state \(|1\rangle\).

Methods

rescale

Rescale the good state amplitude in the estimation problem.

Attributes

grover_operator

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

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

戻り値の型

QuantumCircuit | None

戻り値

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

is_good_state

Checks whether a bitstring represents a good state.

戻り値の型

Callable[[str], bool]

戻り値

Handle to the is_good_state callable.

objective_qubits

Get the criterion for a measurement outcome to be in a 『good』 state.

戻り値

The criterion as list of qubit indices.

post_processing

Apply post processing to the input value.

戻り値の型

Callable[[float], float]

戻り値

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

state_preparation

Get the \(\mathcal{A}\) operator encoding the amplitude \(a\).

戻り値の型

QuantumCircuit | None

戻り値

The \(\mathcal{A}\) operator as QuantumCircuit.