class_docstr: A base class for all quantum object like operators and states.
class_docstr_tok: ["A","base","class","for","all","quantum","object","like","operators","and","states","."]
code: def _format_represent(self, result, format):
      if format == "sympy" and not isinstance(result, Matrix):
          return to_sympy(result)
      elif format == "numpy" and not isinstance(result, numpy_ndarray):
          return to_numpy(result)
      elif format == "scipy.sparse" and not isinstance(
          result, scipy_sparse_matrix
      ):
          return to_scipy_sparse(result)
  
      return result
  
imports: from sympy.core.expr import Expr
  from sympy.core.symbol import Symbol
  from sympy.core.sympify import sympify
  from sympy.matrices.dense import Matrix
  from sympy.printing.pretty.stringpict import prettyForm
  from sympy.core.containers import Tuple
  from sympy.utilities.iterables import is_sequence
  from sympy.physics.quantum.dagger import Dagger
  from sympy.physics.quantum.matrixutils import numpy_ndarray, scipy_sparse_matrix, to_sympy, to_numpy, to_scipy_sparse
label_desc: Use image node_id 28 for calling the QExpr obj's underlying member method code with example usage: obj._format_represent(result, format) and returns: result, to_sympy, to_numpy, to_scipy_sparse