diff --git a/graphix/command.py b/graphix/command.py index 11c13c60..f602124f 100644 --- a/graphix/command.py +++ b/graphix/command.py @@ -51,10 +51,19 @@ class N(_KindChecker): @dataclasses.dataclass -class M(_KindChecker): - """Measurement command. By default the plane is set to 'XY', the angle to 0, empty domains and identity vop.""" +class BaseM: + """Base class for measurement command. + + This class does not contain any data except for the node to measure. + """ node: Node + + +@dataclasses.dataclass +class M(BaseM, _KindChecker): + """Measurement command. By default the plane is set to 'XY', the angle to 0, empty domains and identity vop.""" + plane: Plane = Plane.XY angle: float = 0.0 s_domain: set[Node] = dataclasses.field(default_factory=set) @@ -137,8 +146,6 @@ class T(_KindChecker): Command = Union[N, M, E, C, X, Z, S, T] Correction = Union[X, Z] -BaseM = M - @dataclasses.dataclass class MeasureUpdate: