classGlobalParameter(AbstractGate):ops:Sequence[AbstractGate]weights:ArrayLike@beartypedef__init__(self,ops:Sequence[AbstractGate],weights:ArrayLike,):# if not len(ops) and weights.shape[0]wires=[wireforopinopsforwireinop.wires]super().__init__(wires=wires)self.ops=opsself.weights=paramax.non_trainable(weights)defunwrap(self):"""Unwraps the shared ops for compilation and contractions."""returnself.ops