code: def prepare(self, cache):
          
          if cache is not None:
              np.copyto(self.qubits, cache)
          else:
              self.qubits.fill(0.0)
              self.qubits[0] = 1.0
          self.cregs = [0] * self.n_qubits
docs: Prepare to run next shot.