cvqnn_layers_normal

Module: pennylane.init

cvqnn_layers_normal(n_layers, n_wires, mean=0, std=1, mean_active=0, std_active=0.1, seed=None)[source]

Creates a list of eleven parameter arrays for CVNeuralNetLayers(), where both active and non-active gate parameters are drawn from normal distributions.

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 from a normal distribution with mean mean and standard deviation std, 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 mean mean_active and standard deviation std_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:
 
  • mean (float) – mean of non-active parameters
  • std (float) – standard deviation of non-active parameters
  • 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