From 2d6a018ab32207386a5a0407ac69748e12ce7965 Mon Sep 17 00:00:00 2001 From: Alessandro Candido Date: Fri, 13 Sep 2024 16:52:56 +0200 Subject: [PATCH] fix: Remove deepcopies in sequence building --- src/qibolab/sequence.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qibolab/sequence.py b/src/qibolab/sequence.py index 4b91c05b1..fcfb05cf3 100644 --- a/src/qibolab/sequence.py +++ b/src/qibolab/sequence.py @@ -2,7 +2,6 @@ from collections import UserList from collections.abc import Callable, Iterable -from copy import deepcopy from typing import Any, Union from pydantic import TypeAdapter @@ -122,7 +121,7 @@ def __lshift__(self, other: Iterable[_Element]) -> "PulseSequence": Other than that, it is based on :meth:`concatenate`. """ - copy = deepcopy(self) + copy = self.copy() copy <<= other return copy @@ -153,7 +152,7 @@ def __or__(self, other: Iterable[_Element]) -> "PulseSequence": Other than that, it is based on :meth:`concatenate`. """ - copy = deepcopy(self) + copy = self.copy() copy |= other return copy