docs: def _simulator_iterator(self, circuit: circuits.Circuit,
                              param_resolver: study.ParamResolver,
                              qubit_order: ops.QubitOrderOrList,
                              initial_state: Union[int, np.ndarray]) -> Iterator:
          """See definition in `cirq.SimulatesIntermediateState`.
  
          If the initial state is an int, the state is set to the computational
          basis state corresponding to this state. Otherwise  if the initial
          state is a np.ndarray it is the full initial state, either a pure state
          or the full density matrix.  If it is the pure state it must be the
          correct size, be normalized (an L2 norm of 1), and be safely castable
          to an appropriate dtype for the simulator.  If it is a mixed state
          it must be correctly sized and positive semidefinite with trace one.
          """
          param_resolver = param_resolver or study.ParamResolver({})
          resolved_circuit = protocols.resolve_parameters(circuit, param_resolver)
          actual_initial_state = 0 if initial_state is None else initial_state
          return self._base_iterator(resolved_circuit,
                                     qubit_order,
                                     actual_initial_state)