NoiseModel.from_backend

classmethod NoiseModel.from_backend(backend, gate_error=True, readout_error=True, thermal_relaxation=True, temperature=0, gate_lengths=None, gate_length_units='ns', standard_gates=True)[source]

Return a noise model derived from a devices backend properties.

This function generates a noise model based on:

The Error error parameters are tuned for each individual qubit based on the \(T_1\), \(T_2\), frequency and readout error parameters for each qubit, and the gate error and gate time parameters for each gate obtained from the device backend properties.

Additional Information

The noise model includes the following errors:

  • If readout_error=True include single qubit readout errors on measurements.

  • If gate_error=True and thermal_relaxation=True include:

  • If gate_error=True is True and thermal_relaxation=False:

  • If gate_error=False and thermal_relaxation=True include single-qubit thermal_relaxation_errors() on each qubits participating in a multi-qubit gate.

For best practice in simulating a backend make sure that the circuit is compiled using the set of basis gates in the noise module by setting basis_gates=noise_model.basis_gates and using the device coupling map with coupling_map=backend.configuration().coupling_map

Specifying custom gate times

The gate_lengths kwarg can be used to specify custom gate times to add gate errors using the \(T_1\) and \(T_2\) values from the backend properties. This should be passed as a list of tuples gate_lengths=[(name, value), ...] where name is the gate name string, and value is the gate time in nanoseconds.

If a custom gate is specified that already exists in the backend properties, the gate_lengths value will override the gate time value from the backend properties. If non-default values are used gate_lengths should be a list

Parameters
  • backend (Backend or BackendProperties) – backend properties.

  • gate_error (bool) – Include depolarizing gate errors (Default: True).

  • readout_error (Bool) – Include readout errors in model (Default: True).

  • thermal_relaxation (Bool) – Include thermal relaxation errors (Default: True).

  • temperature (double) – qubit temperature in milli-Kelvin (mK) for thermal relaxation errors (Default: 0).

  • gate_lengths (list) – Custom gate times for thermal relaxation errors. Used to extend or override the gate times in the backend properties (Default: None))

  • gate_length_units (str) – Time units for gate length values in gate_lengths. Can be ‘ns’, ‘ms’, ‘us’, or ‘s’ (Default: ‘ns’).

  • standard_gates (bool) – If true return errors as standard qobj gates. If false return as unitary qobj instructions (Default: True)

Returns

An approximate noise model for the device backend.

Return type

NoiseModel

Raises

NoiseError – If the input backend is not valid.