code: def print_state(state: State, file: TextIO = None) -> None:
      
      state = state.vec.asarray()
      for index, amplitude in np.ndenumerate(state):
          ket = "".join([str(n) for n in index])
          print(ket, ":", amplitude, file=file)
docs: Print a state vector