From 639353402c3fcb94427eab40d83497e254db2da2 Mon Sep 17 00:00:00 2001 From: Fionn Malone Date: Sat, 29 Jun 2024 06:57:25 +0000 Subject: [PATCH] Add experiment. --- recirq/qcqmc/experiment.py | 4 ++-- recirq/qcqmc/experiment_test.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/recirq/qcqmc/experiment.py b/recirq/qcqmc/experiment.py index 6fb45cca..c8fad403 100644 --- a/recirq/qcqmc/experiment.py +++ b/recirq/qcqmc/experiment.py @@ -65,7 +65,7 @@ def path_string(self) -> str: def _json_dict_(self): simple_dict = attrs.asdict(self) - simple_dict["blueprint_params"] = cirq.to_json(self.blueprint_params) + simple_dict["blueprint_params"] = self.blueprint_params return simple_dict @@ -87,7 +87,7 @@ class ExperimentData(data.Data): def _json_dict_(self): simple_dict = attrs.asdict(self) - simple_dict["params"] = self.params._json_dict_() # type: ignore + simple_dict["params"] = self.params return simple_dict diff --git a/recirq/qcqmc/experiment_test.py b/recirq/qcqmc/experiment_test.py index f2cef5b2..40cfe5a5 100644 --- a/recirq/qcqmc/experiment_test.py +++ b/recirq/qcqmc/experiment_test.py @@ -48,5 +48,4 @@ def test_small_experiment_raw_samples_shape( assert raw_samples.shape == (17, 31, 4) exp2 = cirq.read_json(json_text=cirq.to_json(experiment)) - print(exp2) assert exp2 == experiment