Module name:

Code author: Maria Schuld <>

Collection of helpers to set up an experiment with the tensorflow circuit learner.


make_param([name, stdev, mean, interval, …]) Return a tensorflow variable.

Code details, stdev=None, mean=0.0, interval=None, constant=None, shape=(), regularize=False, monitor=False, seed=None)[source]

Return a tensorflow variable.

  • name (str) – name of the variable
  • stdev (float) – If not None, initialise from normal distribution.
  • mean (float) – If stdev is not None, use this mean for normal distribution. Defaults to 0.
  • interval (list of length 2) – If stdev is None and interval is not None, initialise from random value sampled uniformly from this interval.
  • constant (float) – If stdev and interval are both None and constant is not None, use this as an initial value. If constant is also None, use 0 as an initial value (not recommended!).
  • shape (tuple or list) – Shape of variable tensor. Useful for layered architectures.
  • regularize (boolean) – If true, mark this parameter for regularization.
  • monitor (boolean) – Whether to add this variable to tensorboard summary.
  • seed (int) – Use this seed to generate random numbers.