def _create_partial_simulation_state(
        self,
        initial_state: cirq.STATE_VECTOR_LIKE | cirq.StateVectorSimulationState,
        qubits: Sequence[cirq.Qid],
        classical_data: cirq.ClassicalDataStore,
    ):
        """Creates the StateVectorSimulationState for a circuit.

        Args:
            initial_state: The initial state for the simulation in the
                computational basis.
            qubits: Determines the canonical ordering of the qubits. This
                is often used in specifying the initial state, i.e. the
                ordering of the computational basis states.
            classical_data: The shared classical data container for this
                simulation.

        Returns:
            StateVectorSimulationState for the circuit.
        """
        if isinstance(initial_state, state_vector_simulation_state.StateVectorSimulationState):
            # Instances of SimulationStateBase usually returned before this point
            return initial_state  # pragma: no cover

        return state_vector_simulation_state.StateVectorSimulationState(
            qubits=qubits,
            prng=self._prng,
            classical_data=classical_data,
            initial_state=initial_state,
            dtype=self._dtype,
        )
Creates the StateVectorSimulationState for a circuit.

        Args:
            initial_state: The initial state for the simulation in the
                computational basis.
            qubits: Determines the canonical ordering of the qubits. This
                is often used in specifying the initial state, i.e. the
                ordering of the computational basis states.
            classical_data: The shared classical data container for this
                simulation.

        Returns:
            StateVectorSimulationState for the circuit.
        
cirq-core/cirq/sim/sparse_simulator.py