QAOA.construct_circuit

QAOA.construct_circuit(parameter)

Generate the ansatz circuit and expectation value measurement, and return their runnable composition.

Parameters

parameter (Union[List[float], List[Parameter], ndarray]) – Parameters for the ansatz circuit.

Return type

OperatorBase

Returns

The Operator equalling the measurement of the ansatz StateFn by the Observable’s expectation StateFn.

Raises

AquaError – If no operator has been provided.