[QE-users] Discussion on random matrix generation in set_irr_new: GOE or GUE

songcn23 at mails.jlu.edu.cn songcn23 at mails.jlu.edu.cn
Wed Jul 30 03:48:45 CEST 2025


Dear all,

I am currently performing phonon calculations on a large system, a twisted bilayer MoS₂ supercell containing 78 atoms, using Quantum ESPRESSO v7.3.1. During the ph.x run, the calculation stops with the following error:

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     Error in routine set_irr_sym_new (6422):
     wrong representation
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

After looking into the source code, my understanding is that this error is raised by the unitary check in set_irr_sym_new. I guess this check fails when a subspace of modes, which is supposed to form a basis for an irreducible representation (irrep), is not closed under the symmetry operations of the small group of q. In a large system like mine, this could possibly be triggered by the accumulation of numerical errors during the diagonalization process.

Following the advice in the random_matrix_new.f90 source file, my first attempt was to uncomment the __UNIFORM_DISTRIB macro to switch from the default Gaussian distribution to a uniform distribution for the initial random matrix generation. While this change allowed the unitary check to pass, I observed that it produced a significantly larger number of "accidental" degeneracies in the npert array (i.e., it reported irrep dimensions larger than the maximum possible dimension for the small group of q). At the time, I was concerned about how these non-physical degeneracies might affect the subsequent calculations, as I was not yet fully aware of how find_mode_sym_new later resolves these with the character orthogonality theorem.

This led me to explore other aspects of the random matrix generation. I am not a student specializing in numerical methods, so my knowledge of random matrix theory is quite limited. However, in some brief reading, I came across the concept of different random matrix ensembles. I noticed that for complex Hermitian matrices, there exists a Gaussian Unitary Ensemble (GUE) which is distinct from the Gaussian Orthogonal Ensemble (GOE). By adapting the coefficients for the matrix elements according to the definition of GUE (specifically, scaling the off-diagonal elements), I found that the calculation for the same structure proceeded without the "wrong representation" error. This makes me curious: for the complex matrices used in this context, might GUE be a more suitable ensemble for generating the initial random dynamical matrix?

To make my point clearer, here is my understanding of the conventions for constructing the matrix elements M(i,j) from a standard normal distribution N(0,1), compared to what I found in the code:

###############################################
Gaussian Unitary Ensemble (GUE) convention:
Diagonal M(i,i): Real, constructed as N(0,1).
Off-diagonal M(i,j) for i ≠ j: Complex, constructed as (N₁ + i*N₂) / sqrt(2)
This ensemble maintains equal variance for both diagonal and off-diagonal elements.
###############################################
Current implementation in random_matrix_new.f90 (default Gaussian):
Diagonal M(i,i): Real, constructed as 2.0 * N(0,1).
Off-diagonal M(i,j) for i ≠ j: Complex, constructed as N₁ + i*N₂.
Here, the variance of the diagonal elements is twice the variance of the off-diagonal elements. This variance structure is a characteristic feature of the GOE family.
###############################################

I would be very grateful for any insights or discussion from the community and developers on these observations.

Thank you for your time and for this great software.

Best regards,

C. Song
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20250730/ad45ea46/attachment.html>


More information about the users mailing list