def __init__(self, *args):
    self._eigvals_cache = None
    self.obs = []
    for o in args:
        if isinstance(o, Tensor):
            self.obs.extend(o.obs)
        elif isinstance(o, Observable):
            self.obs.append(o)
        else:
            raise ValueError('Can only perform tensor products between observables.')
def __init__(self, *args):
    self._eigvals_cache = None
    self.obs = []
    for o in args:
        if isinstance(o, Tensor):
            self.obs.extend(o.obs)
        elif isinstance(o, Observable):
            self.obs.append(o)
        else:
            raise ValueError('Can only perform tensor products between observables.')