transform_noise_model(noise_model: NoiseModel, func: Callable) NoiseModel[source]#

Return a new noise model by applyign a function to all quantum errors.

This returns a new noise model containing the resulting errors from applying the supplied function to all QuantumErrors in the noise model. This function should have singature func(error: QuantumError) -> QuantumError where the returned quantum error is defined on the same number of qubits as the original error.

  • noise_model – the noise model to be transformed.

  • func – function for transforming QuantumErrors.


The transpiled noise model.


NoiseError – if the transformation failed.