WarmStartQAOAFactory#

class WarmStartQAOAFactory(epsilon)[fuente]#

Bases: 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.

Parámetros:

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.

Muestra:

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

Methods

create_initial_state(initial_variables)[fuente]#

Creates an initial state quantum circuit to warm start QAOA.

Parámetros:

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

Devuelve:

A quantum circuit that represents initial state.

Tipo del valor devuelto:

QuantumCircuit

create_initial_variables(solution)[fuente]#

Creates initial variable values to warm start QAOA.

Parámetros:

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

Devuelve:

A list of initial variables constructed from a relaxed solution.

Tipo del valor devuelto:

List[float]

create_mixer(initial_variables)[fuente]#

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

Parámetros:

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

Devuelve:

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

Tipo del valor devuelto:

QuantumCircuit