def __init__(
        self,
        *,
        dtype: type[np.complexfloating] = np.complex64,
        noise: cirq.NOISE_MODEL_LIKE = None,
        seed: cirq.RANDOM_STATE_OR_SEED_LIKE = None,
        split_untangled_states: bool = True,
    ):
        """Density matrix simulator.

        Args:
            dtype: The `numpy.dtype` used by the simulation. One of
                `numpy.complex64` or `numpy.complex128`
            noise: A noise model to apply while simulating.
            seed: The random seed to use for this simulator.
            split_untangled_states: If True, optimizes simulation by running
                unentangled qubit sets independently and merging those states
                at the end.

        Raises:
            ValueError: If the supplied dtype is not `np.complex64` or
                `np.complex128`.

        Example:
           >>> (q0,) = cirq.LineQubit.range(1)
           >>> circuit = cirq.Circuit(cirq.H(q0), cirq.measure(q0))
        """
        super().__init__(
            dtype=dtype, noise=noise, seed=seed, split_untangled_states=split_untangled_states
        )
        if dtype not in {np.complex64, np.complex128}:
            raise ValueError(f'dtype must be complex64 or complex128, was {dtype}')
Density matrix simulator.

        Args:
            dtype: The `numpy.dtype` used by the simulation. One of
                `numpy.complex64` or `numpy.complex128`
            noise: A noise model to apply while simulating.
            seed: The random seed to use for this simulator.
            split_untangled_states: If True, optimizes simulation by running
                unentangled qubit sets independently and merging those states
                at the end.

        Raises:
            ValueError: If the supplied dtype is not `np.complex64` or
                `np.complex128`.

        Example:
           >>> (q0,) = cirq.LineQubit.range(1)
           >>> circuit = cirq.Circuit(cirq.H(q0), cirq.measure(q0))
        
cirq-core/cirq/sim/density_matrix_simulator.py