random_layer_uniform

Module: pennylane.init

random_layer_uniform(n_wires, n_rots=None, low=0, high=6.283185307179586, seed=None)[source]

Creates a list of a single parameter array for RandomLayer(), drawn from a uniform distribution.

The number of parameter array is (n_rots,) and each parameter is drawn uniformly at random from between low and high. The parameters define the rotation angles of the randomly positioned rotations applied in each layer.

Parameters:

n_wires (int) – number of qubits

Keyword Arguments:
 
  • n_rots (int) – number of rotations, if None, n_rots=n_wires
  • low (float) – minimum value of rotation angles
  • high (float) – maximum value of rotation angles
  • seed (int) – seed used in sampling the parameters, makes function call deterministic
Returns:

list of parameter array