QEC-pages / QDistRnd

https://qec-pages.github.io/QDistRnd/
GNU General Public License v2.0
15 stars 2 forks source link

Major issue with the representation of field elements in the MTXE format #5

Closed pan-pavel closed 2 years ago

pan-pavel commented 2 years ago

From openjournals/joss-reviews#4120

Subsection 5.1-1 (Representation of field elements via integers) of the documentation says that:

In the actual file format, we chose to represent non-zero elements as integers, specifying the powers of a primitive element, while the zero field element is represented as -1. Notice that, depending on the choice of the primitive element, the elements of the field may be permuted. However, any such permutation is a field isomorphism preserving the multiplication table. In particular, orthogonality between the rows of the matrices is necessarily preserved.

However, unfortunately, the statement "any such permutation is a field isomorphism" is incorrect. Indeed, if we replace a primitive element a with another primitive element a^i (a root of a different primitive polynomial), then the map x -> x^i is not a field isomorphism since it does not preserve the additive structure, i.e., (x + y)^i is not always equal to x^i + y^i. In short, if we change the primitive element, then the multiplication table is preserved, while the addition table is not. Please, check this link for a discussion of such issues.

Hence, I strongly suggest adding into the proposed MTXE format a parameter for the primitive element of GF(p^s) when s > 1.

I also think that in Subsection 5.2 (Example MTXE files), an example of a matrix over GF(p^s) where s > 1 should be given. Otherwise, it is not very clear how to use the MTXE format in such cases.

LeonidPryadko commented 2 years ago

TODO:

LeonidPryadko commented 2 years ago

This issue is fixed. Explicitly specified primitive polynomial is implemented both in WriteMTXE and in ReadMTXE, with the latter function doing automatic conversion if necessary.