From d8c4cb2b6338b643a587bbe40ad6f4bb40328aca Mon Sep 17 00:00:00 2001 From: Aidan Quinn Wilber-Gauthier Date: Wed, 31 Jul 2024 09:41:16 -0700 Subject: [PATCH 1/2] strip args before matching cloud noise ops --- pygsti/models/cloudnoisemodel.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pygsti/models/cloudnoisemodel.py b/pygsti/models/cloudnoisemodel.py index acca14f1c..fc50b4357 100644 --- a/pygsti/models/cloudnoisemodel.py +++ b/pygsti/models/cloudnoisemodel.py @@ -709,6 +709,7 @@ def _layer_component_cloudnoises(self, model, complbl_list, cache): else: for complbl in complbl_list: + complbl = complbl.strip_args() if complbl.collect_args() else complbl if complbl in cache: ret.append(cache[complbl]) # caches['cloudnoise-layers'] would hold "simplified" instrument members elif complbl in model.operation_blks['cloudnoise']: From 0d84bbf1cbd66b0be469bce38cdcba027ed03bf2 Mon Sep 17 00:00:00 2001 From: Aidan Quinn Wilber-Gauthier Date: Wed, 31 Jul 2024 09:43:21 -0700 Subject: [PATCH 2/2] embed ops to map sslbls --- pygsti/models/modelnoise.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygsti/models/modelnoise.py b/pygsti/models/modelnoise.py index a4cc2c869..e586f2e60 100644 --- a/pygsti/models/modelnoise.py +++ b/pygsti/models/modelnoise.py @@ -537,7 +537,7 @@ def apply_errormap_stencil(self, stencil, evotype, state_space, target_labels=No # `None` in list signals a non-present direction => skip these terms sslbls_list = list(filter(lambda x: x is not None, sslbls_list)) for sslbls in sslbls_list: - op_to_embed = local_errormap if (sslbls is None or state_space.is_entire_space(sslbls)) \ + op_to_embed = local_errormap if (sslbls is None) \ else _op.EmbeddedOp(state_space, sslbls, local_errormap) embedded_errmaps.append(op_to_embed.copy() if copy else op_to_embed)