%noise_model

Warning

This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.

The Modern QDK only supports the '%%qsharp' magic command.

Summary

Gets, sets, saves, or loads a noise model used in simulating quantum operations.

Description

This magic command allows accessing or modifying the noise model used by the %simulate_noise magic command.

Examples for %noise_model

Example 1

Return the currently set noise model:

In []: %noise_model

Example 2

Return the built-in noise model with a given name: In []: %noise_model --get-by-name ideal

Example 3

Sets the noise model to a built-in named noise model:

In []: %noise_model --load-by-name ideal_stabilizer

Example 4

Set the noise model to a noise model given as JSON:

In []: %noise_model { ... }

Example 5

Save the current noise model to a JSON file named noise-model.json:

In []: %noise_model --save noise-model.json

Example 6

Load the noise model stored in noise-model.json, making it the active noise model:

In []: %noise_model --load noise-model.json