def __init__(
        self,
        *,
        qubits: Sequence[cirq.Qid],
        prng: np.random.RandomState,
        simulation_options: MPSOptions = MPSOptions(),
        grouping: dict[cirq.Qid, int] | None = None,
        initial_state: int = 0,
        classical_data: cirq.ClassicalDataStore | None = None,
    ):
        """Creates and MPSState

        Args:
            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.
            prng: A random number generator, used to simulate measurements.
            simulation_options: Numerical options for the simulation.
            grouping: How to group qubits together, if None all are individual.
            initial_state: An integer representing the initial state.
            classical_data: The shared classical data container for this
                simulation.

        Raises:
            ValueError: If the grouping does not cover the qubits.
        """
        qubit_map = {q: i for i, q in enumerate(qubits)}
        final_grouping = qubit_map if grouping is None else grouping
        if final_grouping.keys() != qubit_map.keys():
            raise ValueError('Grouping must cover exactly the qubits.')
        state = _MPSHandler.create(
            initial_state=initial_state,
            qid_shape=tuple(q.dimension for q in qubits),
            simulation_options=simulation_options,
            grouping={qubit_map[k]: v for k, v in final_grouping.items()},
        )
        super().__init__(state=state, prng=prng, qubits=qubits, classical_data=classical_data)
Creates and MPSState

        Args:
            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.
            prng: A random number generator, used to simulate measurements.
            simulation_options: Numerical options for the simulation.
            grouping: How to group qubits together, if None all are individual.
            initial_state: An integer representing the initial state.
            classical_data: The shared classical data container for this
                simulation.

        Raises:
            ValueError: If the grouping does not cover the qubits.
        
cirq-core/cirq/contrib/quimb/mps_simulator.py