Skip to content

Commit

Permalink
fix: Drop configs custom serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Aug 12, 2024
1 parent a8e7b55 commit 5efe7ba
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/qibolab/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def dump(self, path: Path, updates: Optional[list[ConfigUpdate]] = None):

settings = {
"settings": self.settings.model_dump(),
"components": _dump_component_configs(configs),
"components": TypeAdapter(dict[str, Config]).dump_python(configs),
"native_gates": self.native_gates.dump(),
}

Expand Down Expand Up @@ -241,14 +241,6 @@ def _dump_natives(natives: Union[SingleQubitNatives, TwoQubitNatives]):
return data


def _dump_component_configs(component_configs) -> dict:
"""Dump channel configs."""
components = {}
for name, cfg in component_configs.items():
components[name] = cfg.model_dump()
return components


# TODO: kernels are part of the parameters, they should not be dumped separately
def dump_kernels(platform: "Platform", path: Path):
"""Creates Kernels instance from platform and dumps as npz.
Expand Down

0 comments on commit 5efe7ba

Please sign in to comment.