interferometer_uniform

Module: pennylane.init

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

Creates a list of three parameter arrays for an Interferometer(), drawn from a uniform distribution.

The arrays are of the form [theta, phi, varphi], where:

  • theta is the array of beamsplitter transmittivity angles, of size (n_wires*(n_wires-1)/2, )
  • phi is the array of beamsplitter phases, of size (n_wires*(n_wires-1)/2, )
  • varphi is the array of local angles for the final rotation gates, of size (n_wires, )

All parameters are initialized uniformly from the interval [low, high].

Parameters:

n_wires (int) – number of modes that the interferometer acts on

Keyword Arguments:
 
  • low (float) – minimum value of uniformly drawn rotation angles
  • high (float) – maximum value of uniformly drawn rotation angles
  • seed (int) – seed used in sampling the parameters, makes function call deterministic
Returns:

list of parameter arrays