def reindex(self, axes: Sequence[int]) -> _BufferedDensityMatrix:
        """Transposes the axes of a density matrix to a specified order.

        Args:
            axes: The desired axis order. Only the left axes should be provided. For example, to
                transpose [A,B,C,A,B,C] to [C,B,A,C,B,A], `axes` should be [2,1,0].
        Returns:
            The transposed density matrix.
        """
        new_tensor = transformations.transpose_density_matrix_to_axis_order(
            self._density_matrix, axes
        )
        return _BufferedDensityMatrix(density_matrix=new_tensor)
Transposes the axes of a density matrix to a specified order.

        Args:
            axes: The desired axis order. Only the left axes should be provided. For example, to
                transpose [A,B,C,A,B,C] to [C,B,A,C,B,A], `axes` should be [2,1,0].
        Returns:
            The transposed density matrix.
        
cirq-core/cirq/sim/density_matrix_simulation_state.py