cvqnn_layers_uniform¶
Module: pennylane.init
-
cvqnn_layers_uniform
(n_layers, n_wires, low=0, high=6.283185307179586, mean_active=0, std_active=0.1, seed=None)[source]¶ Creates a list of eleven parameter arrays for
CVNeuralNetLayers()
, where non-active gate parameters are drawn from a uniform distribution and active parameters from a normal distribution.The shape of the arrays is
(n_layers, n_wires*(n_wires-1)/2)
for the parameters used in an interferometer, and(n_layers, n_wires)
else.All gate parameters are drawn uniformly from the interval
[low, high]
, except from the three types of ‘active gate parameters’: the displacement amplitude, squeezing amplitude and kerr parameter. These active gate parameters are sampled from a normal distribution with meanmean_active
and standard deviationstd_active
. Since they influence the mean photon number (or energy) of the quantum system, one typically wants to initialize them with values close to zero.Parameters: - n_layers (int) – number of layers of the CV Neural Net
- n_wires (int) – number of modes of the CV Neural Net
Keyword Arguments: - low (float) – minimum value of uniformly drawn rotation angles
- high (float) – maximum value of uniformly drawn rotation angles
- mean_active (float) – mean of active gate parameters
- std_active (float) – standard deviation of active gate parameters
- seed (int) – seed used in sampling the parameters, makes function call deterministic
Returns: list of parameter arrays