From 7e8b4b9f4c72cb675f8ebdf37b4f433c35fd4f62 Mon Sep 17 00:00:00 2001 From: HGSilveri Date: Fri, 26 Apr 2024 16:47:44 +0200 Subject: [PATCH] Add NoiseModel and EmulatorConfig to API reference --- docs/source/apidoc/backend.rst | 5 +++++ docs/source/apidoc/core.rst | 5 ++++- docs/source/apidoc/simulation.rst | 2 +- pulser-core/pulser/noise_model.py | 18 ++++++++++++------ 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/docs/source/apidoc/backend.rst b/docs/source/apidoc/backend.rst index 263b35ce2..5a84baecc 100644 --- a/docs/source/apidoc/backend.rst +++ b/docs/source/apidoc/backend.rst @@ -12,6 +12,11 @@ QPU Emulators ---------- +Configuration +^^^^^^^^^^^^^^ +.. autoclass:: pulser.EmulatorConfig + :members: + Local ^^^^^^^ .. autoclass:: pulser_simulation.QutipBackend diff --git a/docs/source/apidoc/core.rst b/docs/source/apidoc/core.rst index 83984dfb3..fd6e1714d 100644 --- a/docs/source/apidoc/core.rst +++ b/docs/source/apidoc/core.rst @@ -110,7 +110,10 @@ which when associated with a :class:`pulser.Sequence` condition its development. .. autodata:: pulser.devices.DigitalAnalogDevice - +Noise Model +-------------- +.. automodule:: pulser.noise_model + :members: Channels --------------------- diff --git a/docs/source/apidoc/simulation.rst b/docs/source/apidoc/simulation.rst index 74d233924..0ce479890 100644 --- a/docs/source/apidoc/simulation.rst +++ b/docs/source/apidoc/simulation.rst @@ -21,7 +21,7 @@ in favour of :class:`QutipEmulator`. SimConfig ---------------------- -.. automodule:: pulser_simulation.simconfig +.. autoclass:: pulser_simulation.SimConfig :members: Simulation Results diff --git a/pulser-core/pulser/noise_model.py b/pulser-core/pulser/noise_model.py index 0af199500..53585344c 100644 --- a/pulser-core/pulser/noise_model.py +++ b/pulser-core/pulser/noise_model.py @@ -48,33 +48,39 @@ class NoiseModel: are only taken into account when the related noise type is selected. Args: - noise_types: Noise types to include in the emulation. Available - options: + noise_types: Noise types to include in the emulation. + Available options: - "relaxation": Noise due to a decay from the Rydberg to the ground state (parametrized by `relaxation_rate`), commonly characterized experimentally by the T1 time. + - "dephasing": Random phase (Z) flip (parametrized by `dephasing_rate`), commonly characterized experimentally by the T2* time. + - "depolarizing": Quantum noise where the state is turned into the maximally mixed state with rate `depolarizing_rate`. While it does not describe a physical phenomenon, it is a commonly used tool to test the system under a uniform combination of phase flip (Z) and bit flip (X) errors. + - "eff_noise": General effective noise channel defined by the set of collapse operators `eff_noise_opers` and the corresponding rates distribution `eff_noise_rates`. + - "doppler": Local atom detuning due to termal motion of the atoms and Doppler effect with respect to laser frequency. Parametrized by the `temperature` field. + - "amplitude": Gaussian damping due to finite laser waist and - laser amplitude fluctuations. Parametrized by `laser_waist` - and `amp_sigma`. - - "SPAM": SPAM errors. Parametrized by `state_prep_error`, - `p_false_pos` and `p_false_neg`. + laser amplitude fluctuations. Parametrized by `laser_waist` + and `amp_sigma`. + + - "SPAM": SPAM errors. Parametrized by + `state_prep_error`, `p_false_pos` and `p_false_neg`. runs: Number of runs needed (each run draws a new random noise). samples_per_run: Number of samples per noisy run. Useful for