Skip to content

Commit

Permalink
Change EmuTN default sampling rate (#578)
Browse files Browse the repository at this point in the history
* Change default sampling rate

* Add hint to docstring

* Fix test

---------

Co-authored-by: Henrique Silvério <[email protected]>
  • Loading branch information
lvignoli and HGSilveri authored Sep 15, 2023
1 parent b5a75af commit d9e1fd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions pulser-pasqal/pulser_pasqal/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
from pulser.backend.remote import JobParams, RemoteBackend, RemoteResults
from pulser_pasqal.pasqal_cloud import PasqalCloud

DEFAULT_CONFIG_EMU_TN = EmulatorConfig(evaluation_times="Final")
DEFAULT_CONFIG_EMU_TN = EmulatorConfig(
evaluation_times="Final", sampling_rate=0.1
)
DEFAULT_CONFIG_EMU_FREE = EmulatorConfig(
evaluation_times="Final", sampling_rate=0.25
)
Expand Down Expand Up @@ -109,7 +111,8 @@ class EmuTNBackend(PasqalEmulator):
"""An emulator backend using tensor network simulation.
Configurable fields in EmulatorConfig:
- sampling_rate
- sampling_rate: Defaults to 0.1. This value must remain low to use
this backend efficiently.
- backend_options:
- precision (str): The precision of the simulation. Can be "low",
"normal" or "high". Defaults to "normal".
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pasqal.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def test_emulators_run(fixt, seq, emu_cls, parametrized: bool):
sdk_config: EmuTNConfig | EmuFreeConfig
if isinstance(emu, EmuTNBackend):
emulator_type = EmulatorType.EMU_TN
sdk_config = EmuTNConfig(dt=1.0)
sdk_config = EmuTNConfig(dt=10)
else:
emulator_type = EmulatorType.EMU_FREE
sdk_config = EmuFreeConfig()
Expand Down

0 comments on commit d9e1fd2

Please sign in to comment.