WarmStartQAOAFactory#

class WarmStartQAOAFactory(epsilon)[ソース]#

ベースクラス: object

A factory that produces quantum circuits for the QAOA implementation. The methods of this factory can be overridden to modify behavior of QAOA. This implementation generates quantum circuits for initial state and mixer to warm start QAOA.

パラメータ:

epsilon (float) – the regularization parameter that changes the initial variables according to xi = epsilon if xi < epsilon xi = 1-epsilon if xi > epsilon. The regularization parameter epsilon should be between 0 and 0.5. When it is 0.5 then warm start corresponds to standard QAOA.

例外:

QiskitOptimizationError – if epsilon is not in the range [0, 0.5].

Methods

create_initial_state(initial_variables)[ソース]#

Creates an initial state quantum circuit to warm start QAOA.

パラメータ:

initial_variables (List[float]) – Already created initial variables.

戻り値:

A quantum circuit that represents initial state.

戻り値の型:

QuantumCircuit

create_initial_variables(solution)[ソース]#

Creates initial variable values to warm start QAOA.

パラメータ:

solution (ndarray) – a solution obtained for the relaxed problem.

戻り値:

A list of initial variables constructed from a relaxed solution.

戻り値の型:

List[float]

create_mixer(initial_variables)[ソース]#

Creates an evolved mixer circuit as Ry(theta)Rz(-2beta)Ry(-theta).

パラメータ:

initial_variables (List[float]) – Already created initial variables.

戻り値:

A quantum circuit to be used as a mixer in QAOA.

戻り値の型:

QuantumCircuit