pygsti.extras.idletomography.idttools.set_idle_errors

pygsti.extras.idletomography.idttools.set_idle_errors#

set_idle_errors(nqubits, model, errdict, rand_default=None, hamiltonian=True, stochastic=True, affine=True)#

Set specific or random error terms (typically for a data-generating model) within a noise model (a CloudNoiseModel object).

Parameters:
  • nqubits (int) – The number of qubits.

  • model (CloudNoiseModel) – The model, to set the idle errors of.

  • errdict (dict) – A dictionary of errors to include. Keys are “S(<>)”, “H(<>)”, and “A(<>)” where <> is a string of ‘X’,’Y’,’Z’,and ‘I’ (e.g. “S(XIZ)”) and values are floating point error rates.

  • rand_default (float or numpy array, optional) – Random error rates to insert into values not specified in errdict. If a floating point number, a random value between 0 and rand_default is used. If an array, then values are taken directly and sequentially from this array (typically of random rates). The array must be long enough to provide values for all unspecified rates.

  • hamiltonian (bool, optional) – Whether model includes Hamiltonian, Stochastic, and/or Affine errors (e.g. if the model was built with “H+S” parameterization, then only hamiltonian and stochastic should be set to True).

  • stochastic (bool, optional) – Whether model includes Hamiltonian, Stochastic, and/or Affine errors (e.g. if the model was built with “H+S” parameterization, then only hamiltonian and stochastic should be set to True).

  • affine (bool, optional) – Whether model includes Hamiltonian, Stochastic, and/or Affine errors (e.g. if the model was built with “H+S” parameterization, then only hamiltonian and stochastic should be set to True).

Returns:

The random rates the were used.

Return type:

numpy.ndarray