Skip to content

Commit

Permalink
Merge pull request #10 from Alqor-UG/9-simplify-the-gen_script
Browse files Browse the repository at this point in the history
Clean the spooler
  • Loading branch information
fretchen authored Jan 21, 2024
2 parents bff1409 + 9c8ccec commit 1e61273
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 257 deletions.
1 change: 0 additions & 1 deletion .github/workflows/spooler_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ jobs:
run: |
poetry run mypy maintainer.py
poetry run mypy config.py
poetry run mypy spooler.py
poetry run mypy test_mot.py
23 changes: 15 additions & 8 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
from typing import Literal, List, Optional
from pydantic import Field, BaseModel
from typing_extensions import Annotated
from decouple import config

from sqooler.schemes import LabscriptSpooler
import runmanager.remote # pylint: disable=import-error
from lyse import Run # pylint: disable=import-error

from sqooler.spoolers import LabscriptSpooler
from sqooler.schemes import LabscriptParams

from spooler import ( # pylint: disable=import-error
gen_script_and_globals,
remoteClient,
)

N_MAX_SHOTS = 100
N_MAX_ATOMS = 500
Expand Down Expand Up @@ -71,6 +72,13 @@ class MotExperiment(BaseModel):
seed: Optional[int] = None


# further detailled params for the config
labscript_params = LabscriptParams(
exp_script_folder=config("EXP_SCRIPT_FOLDER"), t_wait=2
)

remoteClient = runmanager.remote.Client()

# This is the spooler object that is used by the main function.
spooler_object = LabscriptSpooler(
ins_schema_dict={
Expand All @@ -80,13 +88,12 @@ class MotExperiment(BaseModel):
},
remote_client=remoteClient,
device_config=MotExperiment,
labscript_params=labscript_params,
run=Run,
n_wires=1,
version="0.1",
description="Setup of an atomic mot.",
n_max_experiments=MAX_EXPERIMENTS,
n_max_shots=N_MAX_SHOTS,
operational=True,
)

# Now also add the function that generates the circuit
spooler_object.gen_circuit = gen_script_and_globals
Loading

0 comments on commit 1e61273

Please sign in to comment.