Module name: qmlt.numerical.helpers

Code author: Maria Schuld <>

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


make_param([name, stdev, mean, interval, …]) Return a circuit parameter.

Code details

qmlt.numerical.helpers.make_param(name=None, stdev=None, mean=0.0, interval=None, constant=None, regularize=False, monitor=False, seed=None)[source]

Return a circuit parameter.

  • 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.
  • 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!).
  • regularize (boolean) – If true, regularize this parameter.
  • monitor (boolean) – If true, monitor this variable for plotting.

Dictionary representing a circuit parameter.

Return type: