docs: def space(self):
          """Combined Hilbert space of all matrix elements."""
          arg_spaces = [o.space for o in self.matrix.ravel()
                        if hasattr(o, 'space')]
          if len(arg_spaces) == 0:
              return TrivialSpace
          else:
              return ProductSpace.create(*arg_spaces)