code: def scalars_to_op(cls, ops, kwargs):
      r'''Convert any scalar $\alpha$ in `ops` into an operator $\alpha
      \identity$'''
      from qnet.algebra.core.scalar_algebra import is_scalar
      op_ops = []
      for op in ops:
          if is_scalar(op):
              op_ops.append(op * cls._one)
          else:
              op_ops.append(op)
      return op_ops, kwargf scalars_to_op(cls, ops, kwargs):
      r'''Convert any scalar $\alpha$ in `ops` into an operator $\alpha
      \identity$'''
      from qnet.algebra.core.scalar_algebra import is_scalar
      op_ops = []
      for op in ops:
          if is_scalar(op):
              op_ops.append(op * cls._one)
          else:
              op_ops.append(op)
      return op_ops, kwargs
docs: r'''Convert any scalar $\alpha$ in `ops` into an operator $\alpha
      \identity$