qml.init.particle_conserving_u2_normal

particle_conserving_u2_normal(n_layers, n_wires, mean=0, std=0.1, seed=None)[source]

Creates a parameter array for ParticleConservingU2(), drawn from a normal distribution. Each parameter is drawn from a normal distribution with mean and standard deviation std. The parameters define the trainable angles entering the Z rotation \(R_\mathrm{z}(\vec{\theta})\) and particle-conserving gate \(U_{2,\mathrm{ex}}\) implemented by the u2_ex_gate(). :param n_layers: number of layers :type n_layers: int :param n_wires: number of qubits :type n_wires: int :param mean: mean of parameters :type mean: float :param std: standard deviation of parameters :type std: float :param seed: seed used in sampling the parameters, makes function call deterministic :type seed: int

Returns

parameter array

Return type

array

Contents

Using PennyLane

Development

API