qml.init.qaoa_embedding_uniform

qaoa_embedding_uniform(n_layers, n_wires, low=0, high=6.283185307179586, seed=None)[source]

Creates a parameter array for QAOAEmbedding(), drawn from a uniform distribution.

Each parameter is drawn uniformly at random from between low and high. The parameters define the trainable angles of ‘ZZ interactions’ and the ‘local fields’.

Parameters
  • n_layers (int) – number of layers

  • n_wires (int) – number of qubits

  • low (float) – minimum value of uniform distribution

  • high (float) – maximum value of uniform distribution

  • seed (int) – seed used in sampling the parameters, makes function call deterministic

Returns

parameter array

Return type

array

Contents

Using PennyLane

Development

API