docstr: Return the full tensor whose TT decomposition is given by 'factors'.
  
  Re-assembles 'factors', which represent a tensor in TT/Matrix-Product-State format
  into the corresponding full tensor
  
  Parameters
  ----------
  factors
      TT factors (TT-cores)
  
  Returns
  -------
  output_tensor
      tensor whose TT/MPS decomposition was given by 'factors'
docstr_tok: ["Return","the","full","tensor","whose","TT","decomposition","is","given","by","'factors","'",".","Re-assembles","'factors","'",",","which","represent","a","tensor","in","TT\/Matrix-Product-State","format","into","the","corresponding","full","tensor","Parameters","--","--","--","--","--","factors","TT","factors","(","TT-cores",")","Returns","--","--","--","-","output_tensor","tensor","whose","TT\/MPS","decomposition","was","given","by","'factors","'"]
code: def tt_to_tensor(factors):
      """Return the full tensor whose TT decomposition is given by 'factors'.
  
      Re-assembles 'factors', which represent a tensor in TT/Matrix-Product-State format
      into the corresponding full tensor
  
      Parameters
      ----------
      factors
          TT factors (TT-cores)
  
      Returns
      -------
      output_tensor
          tensor whose TT/MPS decomposition was given by 'factors'
      """  # noqa: E501
      if isinstance(factors, (float, int)):
          return factors
  
      full_shape = [f.shape[1] for f in factors]
      full_tensor = ivy.reshape(factors[0], (full_shape[0], -1))
  
      for factor in factors[1:]:
          rank_prev, _, rank_next = factor.shape
          factor = ivy.reshape(factor, (rank_prev, -1))
          full_tensor = ivy.matmul(full_tensor, factor)
          full_tensor = ivy.reshape(full_tensor, (-1, rank_next))
  
      return ivy.reshape(full_tensor, full_shape)
  
imports: from .base import FactorizedTensor
  import ivy
  import warnings
label_desc: Use image node_id 12 for calling the TTTensor obj's underlying member method code with example usage: obj.tt_to_tensor(factors) and returns: ivy, factors