1 Introduction

Let us consider \({\mathbb {F}}_q^{n\times n},\) the set of the square matrices of order n defined over \({\mathbb {F}}_q\), with q a prime power. It is well known that \({\mathbb {F}}_q^{n\times n}\) equipped with

$$\begin{aligned} d(A,B)=\mathrm {rk}(A-B), \end{aligned}$$

where \(A,B \in {\mathbb {F}}_q^{n\times n}\), is a metric space. If C is a subset of \({\mathbb {F}}_q^{n\times n}\) with the property that for each \(A,B \in {C}\) then \(d(A,B)\ge d\) with \(1\le d\le n\), then we say that C is a d-code. Furthermore, we say that C is additive if C is an additive subgroup of \(({\mathbb {F}}_q^{n\times n},+)\), and C is \({\mathbb {F}}_q\)-linear if C is an \({\mathbb {F}}_q\)-subspace of \(({\mathbb {F}}_q^{n\times n},+,\cdot )\), where \(+\) is the classical matrix addition and \(\cdot \) is the scalar multiplication by an element of \({\mathbb {F}}_q\). Delsarte [10] shows the following bound for a d-code \({\mathcal {C}}\)

$$\begin{aligned} |{C}| \le q^{n(n-d+1)}, \end{aligned}$$

known as Singleton like bound, see also [12]. Codes whose parameters satisfy the aforementioned bound are known as maximum rank distance codes (or shortly MRD-codes), and they have several important applications. Attention has been paid also to rank metric codes with restrictions, which are codes whose words are alternating matrices [11], symmetric matrices [16, 24, 25, 32] and Hermitian matrices [26].

In this paper we deal with Hermitian matrices over \({\mathbb {F}}_{q^2}\).

Consider \(\overline{\cdot } :x \in {\mathbb {F}}_{q^2}\mapsto x^q\in {\mathbb {F}}_{q^2}\) the conjugation map over \({\mathbb {F}}_{q^2}\). Let \(A\in {\mathbb {F}}_{q^2}^{n\times n}\) and denote by \(A^*\) the matrix obtained from A by conjugation of each entry and transposition. A matrix \(A\in {\mathbb {F}}_{q^2}^{n\times n}\) is said Hermitian if \(A^*=A\). Denote by \(\mathrm{H}_{n}(q^2)\) the set of all Hermitian matrices of order n over \({\mathbb {F}}_{q^2}\). In [26, Theorem 1], Schmidt proved that if C is an additive d-code contained in \(\mathrm{H}_{n}(q^2)\), then

$$\begin{aligned} |{C}| \le q^{n(n-d+1)}. \end{aligned}$$
(1)

When the parameters of C satisfy the equality in this bound, we say that C is a maximum (additive) Hermitian d-code. Schmidt also provided constructions of maximum d-codes for all possible value of n and d, except if n and d are both even and \(3<d<n\) [26, Theorems 4 and 5]. When \(d=2\) and when \(d=n\), it is easy to exhibit constructions of maximum additive d-codes. For instance, when \(d=n\) a semifield spread set of symmetric \(n\times n\) matrices over \({\mathbb {F}}_q\), gives rise to an example of maximum n-code of \(\mathrm{H}_n(q^2)\). For \(d=2\), instead, we can take all matrices in \(\mathrm{H}_n(q^2)\) whose main diagonal contains only zeros.

For given \(a\in {\mathbb {F}}_q^*\), \(\rho \in \mathrm {Aut}({\mathbb {F}}_{q^2})\), \(A \in \mathrm {GL}(n,q^2)\) and \(B \in \mathrm{H}_{n}(q^2)\), the map

$$\begin{aligned} \varTheta :C \in \mathrm{H}_{n}(q^2) \mapsto aAC^\rho A^*+B \in \mathrm{H}_{n}(q^2), \end{aligned}$$
(2)

where \(C^\rho \) is the matrix obtained from C by applying \(\rho \) to each of its entry, preserves the rank distance and conversely, see [30]. For two subsets \({C}_1\) and \({C}_2\) of \(\mathrm{H}_{n}(q^2)\), if there exists \(\varTheta \) as in (2) such that

$$\begin{aligned} {C}_2=\{\varTheta (C) :C \in {C}_1\} \end{aligned}$$

we say that \({C}_1\) and \({C}_2\) are equivalent in \(\mathrm{H}_{n}(q^2)\). Nevertheless, we may consider the maps of \({\mathbb {F}}_{q^2}^{n\times n}\) preserving the rank distance, which by [30] are all of the following kind

$$\begin{aligned} \varPsi :C \in {\mathbb {F}}_{q^2}^{n\times n} \mapsto AC^\sigma B+R \in {\mathbb {F}}_{q^2}^{n\times n} \end{aligned}$$
(3)

or

$$\begin{aligned} \varPsi :C \in {\mathbb {F}}_{q^2}^{n\times n} \mapsto A(C^\sigma )^{\mathrm{T}} B+R \in {\mathbb {F}}_{q^2}^{n\times n},\end{aligned}$$

where \(A,B \in \mathrm {GL}(n,q^2)\), \(\sigma \in \mathrm {Aut}({\mathbb {F}}_{q^2})\), \(R\in {\mathbb {F}}_{q^2}^{n\times n}\) and \(C^{\mathrm{T}}\) denotes the transpose of C. For two subsets \({C}_1\) and \({C}_2\) of \(\mathrm{H}_{n}(q^2)\), if there exists \(\varPsi \) as above such that

$$\begin{aligned} {C}_2=\{\varPsi (C) :C \in {C}_1\} \end{aligned}$$

we say that \({C}_1\) and \({C}_2\) are said extended equivalent. Clearly, if \({C}_1\) and \({C}_2\) of \(\mathrm{H}_{n}(q^2)\) are equivalent in \(\mathrm{H}_{n}(q^2)\), they are also extended equivalent. However, when maximum d-codes are considered, the converse statement is not true. In fact, from what Yue Zhou points out in [32], it follows that constructions of commutative semifields exhibited in [9, 33] provide examples of maximum n-codes in \(\mathrm{H}_{n}(q^2)\) say C, with the property that there exist \(A,B \in \mathrm {GL}(n,q^2)\) such that

$$\begin{aligned}A {C} B \subseteq \mathrm{H}_{n}(q^2),\end{aligned}$$

where \(A \ne a B^*\) for each \(a \in {\mathbb {F}}_{q}\).

Along the lines of what has been done by Zhou [32], in Sect. 3 we will investigate on the conditions that guarantee the identification of the aforementioned types of equivalence for maximum Hermitian d-codes. Results in Sect. 3 heavily rely on what Schmidt proven in [26] using the machinery of association schemes. Moreover, in Sect. 4 we will show that providing such conditions holds true for a d-code \({C} \in \mathrm{H}_{n}(q^2)\), then its idealisers are both isomorphic to \({\mathbb {F}}_{q^2}\), and hence they cannot be used as distinguisher, similarly to what happens in the symmetric setting as proved in [32].

In Sect. 5, following [16], we introduce the Hermitian setting from a polynomial point of view, where some properties are easier to establish. Indeed, we show some combinatorial properties of the known constructions of maximum Hermitian codes. Finally, in Sect. 6 we extend the construction presented in [16] yielding an example of maximum Hermitian 2-code and, relying on the results of the previous sections, we are able to show that it is also new.

2 The association scheme of Hermitian matrices

By [2, Sect. 9.5] we have that \(\mathrm{H}_n(q^2)\) gives rise to an association scheme whose classes are

$$\begin{aligned} (A,B)\in R_i \Leftrightarrow \mathrm {rk}(A-B)=i. \end{aligned}$$

Let \(\chi :{\mathbb {F}}_q \rightarrow \mathbb {C}\) be a nontrivial character of \(({\mathbb {F}}_q,+)\) and let

$$\begin{aligned} \langle A,B \rangle =\chi (\mathrm {tr}(A^*B)), \end{aligned}$$

with \(A,B \in \mathrm{H}_n(q^2)\) and \(\mathrm {tr}\) denotes the matrix trace. Denoting by \(\mathrm {H}_i\) the subset of \(\mathrm{H}_n(q^2)\) of matrices having rank equal to i, the eigenvalues of such association scheme are

$$\begin{aligned} Q_k(i)=\sum _{A \in {\mathcal {H}}_k} \langle A,B\rangle ,\,\,\,\text {for}\,\, B \in {\mathcal {H}}_i, \end{aligned}$$

with \(i,k \in \{0,1,\ldots ,n\}\), see [3, 26, 28].

Let \({C} \subseteq \mathrm{H}_n(q^2)\). The inner distribution of C is \((A_0,A_1,\ldots ,A_n)\) of rational numbers given by

$$\begin{aligned} A_i=\frac{|({C}\times {C})\cap R_i|}{|{C}|}. \end{aligned}$$

Therefore, C is a d-code if and only if

$$\begin{aligned} A_1=\ldots =A_{d-1}=0. \end{aligned}$$

The dual inner distribution of C is \((A_0',A_1',\ldots ,A_n')\) where

$$\begin{aligned} A_k'=\sum _{i=0}^n Q_k(i) A_i. \end{aligned}$$

Also, we have that \(A_0'=|{C}|\), \(A_k'\ge 0\) for each \(k \in \{0,1,\ldots ,n\}\) and if C is additive, then |C| divides \(A_i'\) for each \(i\in \{0,\ldots ,n\}\).

If \(A_1'=\ldots =A_t'=0\), we say that C is a t-design. Of course, if C is additive the \(A_i\)’s count the number of matrices in C of rank i with \(i\in \{0,1,\ldots ,n\}\).

Moreover, in such a case we can associate with C its dual in \(\mathrm{H}_n(q^2)\); i.e.,

$$\begin{aligned}{C}^{\perp }=\{X \in \mathrm{H}_n(q^2) \, :\, \langle X,Y\rangle =1 \, \text { for each } \, Y \in {C} \},\end{aligned}$$

and it is possible to show that the coefficients \(\frac{A_k'}{|{C}|}\) count exactly the number of matrices in \({C}^{\perp }\) of rank i with \(i\in \{0,1,\ldots ,n\}\).

Also in [26] the author proved the following results on combinatorial properties of maximum additive Hermitian d-codes when d is odd.

Theorem 2.1

[26, Theorem 1] If \({C} \subseteq \mathrm{H}_{n}(q^2)\) is a Hermitian additive d-code with odd d, then it is maximum if and only if C is an \((n-d+1)\)-design.

Consider m and \(\ell \) two non-negative integers, negative q-binomial coefficient is defined as

$$\begin{aligned} \left[ \begin{matrix} m \\ \ell \end{matrix} \right] _{}= \prod _{i=1}^\ell \frac{(-q)^{m-i+1}-1}{(-q)^i-1}. \end{aligned}$$

We will need the following property for negative q-binomial coefficients. Let k and i be two non-negative integers, then

$$\begin{aligned} \sum _{j=i}^k (-1)^{j-i} (-q)^{\left( {\begin{array}{c}j-i\\ 2\end{array}}\right) } \left[ \begin{matrix} j \\ i \end{matrix} \right] _{}\left[ \begin{matrix} k \\ j \end{matrix} \right] _{}=\delta _{k,i}, \end{aligned}$$
(4)

where \(\delta _{k,i}\) is the Kronecker delta function, see [26, Eq. (6)] and [11, Eq. (10)].

If C is a Hermitian additive d-code and a \((n-d)\)-design, then its inner distribution has been determined.

Theorem 2.2

[26, Theorem 3] If C is a Hermitian additive d-code and a \((n-d)\)-design, then

$$\begin{aligned} A_{n-i}=\sum _{j=i}^{n-d} (-1)^{j-i}(-q)^{\left( {\begin{array}{c}j-i\\ 2\end{array}}\right) } \left[ \begin{matrix} j \\ i \end{matrix} \right] _{}\left[ \begin{matrix} n \\ j \end{matrix} \right] _{}\left( \frac{|{C}|}{q^{nj}}(-1)^{(n+1)j}-1 \right) , \end{aligned}$$

for each \(i \in \{0,1,\ldots ,n-1\}\).

3 The equivalence issue for maximum codes

Following the paper of Zhou [32], we may generalize his considerations to the Hermitian setting.

Let C be a subset of \({\mathbb {F}}_{q^2}^{n\times n}\) and let \(\mathbf {0}\) be the zero vector in \({\mathbb {F}}_{q^2}^n\). In [19] the authors define the following incidence structure

$$\begin{aligned} S(\infty )= & {} \{(\mathbf {0},\mathbf {y}) :\mathbf {y}\in {\mathbb {F}}_{q^2}^n\}, \\ S(X)= & {} \{(\mathbf {x},\mathbf {x}X) :\mathbf {x}\in {\mathbb {F}}_{q^2}^n\}, \,\, \text {for}\,\, X \in {C}. \end{aligned}$$

The kernel K(C) of C is defined as the set of all the endomorphism \(\mu \) of the group \(({\mathbb {F}}_{q^2}^{2n},+)\) such that \(S(X)^\mu \subseteq S(X)\) for every \(X \in {C} \cup \{\infty \}\). The following result has been proved in [19].

Lemma 3.1

Let C be a subset of \({\mathbb {F}}_{q^2}^{n\times n}\).

  1. (a)

    The kernel of C is a ring under addition and composition of maps.

  2. (b)

    If \({C}_1\) and \({C}_2\) are two equivalent rank metric codes in \({\mathbb {F}}_{q^2}^{n\times n}\), then their kernels are equivalent in \({\mathbb {F}}_{q^2}^{n\times n}\).

  3. (c)

    Let \(I_{n}\) denote the identity matrix of \({\mathbb {F}}_{q^2}^{n\times n}\). The set of matrices \(\{aI_{n+n} :a \in {\mathbb {F}}_{q^2}\}\) forms a field isomorphic to \({\mathbb {F}}_{q^2}\) contained in K(C).

  4. (d)

    Let O be the zero matrix in \({\mathbb {F}}_{q^{2}}^{n\times n}\). If \(O\in {C}\), then each element of K(C) must be of the form

    $$\begin{aligned} \left( \begin{array}{cccc} N_1 &{} \quad O \\ O &{} \quad N_2 \end{array} \right) , \end{aligned}$$
    (5)

    where \(N_1,N_2 \in \mathrm {End}(\mathbb {F}_{q^2}^n,+)\).

As a consequence, we can prove the following result.

Lemma 3.2

Let C be a subset of \(\mathrm{H}_n(q^2)\) containing O and \(I_n\). If there are no trivial subspaces U and W such that

  • \({\mathbb {F}}_{q^2}^n=U\oplus W\);

  • \(\{\mathbf {u}X :\mathbf {u} \in U, X \in {C}\}\subseteq U\);

  • \(\{\mathbf {w}X :\mathbf {w} \in W, X \in {C}\}\subseteq W\),

then the kernel of C is isomorphic to a finite field containing \({\mathbb {F}}_{q^2}\).

Proof

Since \(O\in {C}\), by (d) of Lemma 3.1 each element A of K(C) is of Form (5), i.e.

$$\begin{aligned} A=\left( \begin{array}{cccc} N_1 &{} \quad O \\ O &{} \quad N_2 \end{array} \right) . \end{aligned}$$

Because of (a) of Lemma 3.1, it is enough to show that except for the case in which \(N_1\) and \(N_2\) are the zero matrix, \(N_1\) and \(N_2\) are invertible. Since \(A \in K({C})\), then

$$\begin{aligned} \{ (\mathbf {x}N_1,\mathbf {x}XN_2):\mathbf {x} \in {\mathbb {F}}_{q^2}^n \}\subseteq \{ (\mathbf {x},\mathbf {x}X):\mathbf {x} \in {\mathbb {F}}_{q^2}^n \}, \end{aligned}$$

and hence \(\mathbf {x}N_1X=\mathbf {x}XN_2\) for each \(\mathbf {x}\in {\mathbb {F}}_{q^2}^n\). Since \(I_n \in {C}\), we may choose \(X=I_n\) and hence we have \(N_1=N_2\), which will be denoted by N. Suppose that \(\mathbf {x}N=\mathbf {0}\), then we have also that \(\mathbf {x}XN=\mathbf {0}\). This implies that each \(X\in {C}\) maps the kernel of N into itself. Denote by V the kernel of N and by k its dimension. Choosing a suitable basis of \({\mathbb {F}}_{q^2}^n\) in such a way that its first k elements are a basis of V, then each element of C may be written as

$$\begin{aligned} \left( \begin{array}{cccc} X_1 &{} \quad O \\ O &{} \quad X_2 \end{array}\right) , \end{aligned}$$

with \(X_1 \in {H}_k(q^2)\) and \(X_2\in {H}_{n-k}(q^2)\). Let U and W be the subspaces corresponding to the first k coordinates and the last \(n-k\) coordinates, respectively. If \(k>0\), this would contradict the hypothesis and hence \(N_1\) and \(N_2\) are invertible. \(\square \)

3.1 The equivalence issue

In this section we will show that, under some assumptions, the equivalence of two maximum additive Hermitian d-codes in \(\mathrm{H}_n(q^2)\) coincides with extended equivalence in \({\mathbb {F}}_{q^2}^{n\times n}\).

Theorem 3.3

Let d be a positive integer and let C be a maximum additive d-code in \(\mathrm{H}_n(q^2)\). If there exist \(a \in {\mathbb {F}}_{q}^*\) and \(P \in \mathrm {GL}(n,q^2)\) such that

$$\begin{aligned} I_n \in aP^*X P, \end{aligned}$$

then K(C) is isomorphic to a finite field containing \({\mathbb {F}}_{q^2}\). In particular, if \(d<n\) then K(C) is isomorphic to \({\mathbb {F}}_{q^2}\).

Proof

Clearly, by (b) Lemma 3.1, we may assume that \(I_n \in {C}\). Now, we show that the hypothesis in Lemma 3.2 is satisfied and hence K(C) is a finite field. Suppose that there exist two subspaces U and W of \({\mathbb {F}}_{q^2}^n\) such that \({\mathbb {F}}_{q^2}^n=U\oplus W\) and

  • \(\{\mathbf {u}X :\mathbf {u} \in U, X \in {C}\}\subseteq U\) and

  • \(\{\mathbf {w}X :\mathbf {w} \in W, X \in {C}\}\subseteq W\).

Let k be the dimension of U and we may assume that \(k\ge \lfloor \frac{n}{2}\rfloor \) and that a basis for U is given by the first k elements of the standard basis of \({\mathbb {F}}_{q^2}^n\). Therefore, each element M of C can be written as

$$\begin{aligned} M=\left( \begin{array}{c@{\quad }c} M_1 &{} O \\ O &{} M_2 \end{array}\right) , \end{aligned}$$

with \(M_1\in \mathrm{H}_n(q^2)\) and \(M_2 \in \mathrm{H}_{n-k}(q^2)\).

  • If \(d>\lfloor \frac{n}{2}\rfloor \), then the set

    $$\begin{aligned} {C}_1:=\{M_1 :M \in {C}\} \end{aligned}$$

    has size \(|{C}|=q^{n(n-d+1)}\), otherwise there would be two matrices in C whose difference has rank less than or equal to \(n-k\le \lfloor \frac{n}{2}\rfloor \). Its minimum distance \(d_1\) is greater than or equal to \(d-(n-k)\). Bound (1) applied to \({C}_1\) implies

    $$\begin{aligned} q^{n(n-d+1)}=|{C}_1|\le q^{k(k-d_1+1)}\le q^{k(k-d+(n-k)+1)}. \end{aligned}$$

    Thus \(k=n\).

  • Suppose that \(d\le \lfloor \frac{n}{2}\rfloor \). For each \(M_2 \in \mathrm{H}_{n-k}(q^2)\) let

    $$\begin{aligned} {C}_{M_2}=\left\{ M_1 :\left( \begin{array}{c@{\quad }c} M_1 &{} O \\ O &{} M_2 \end{array}\right) \in {C} \right\} . \end{aligned}$$

    Its minimum distance \(d({C}_{M_2})\ge d\) and by (1),

    $$\begin{aligned} |{C}_{M_2}| \le q^{k(k-d+1)}. \end{aligned}$$

    Therefore,

    $$\begin{aligned} |{C}|=\sum _{M_2 \in {H}_{n-k}(q^2)} |{C}_{M_2}|\le q^{(n-k)(n-k+1)}\cdot q^{k(k-d+1)}, \end{aligned}$$

    and so

    $$\begin{aligned} n(n-d+1)\le & {} (n-k)^2+(n-k)+k(k-d+1)\\\le & {} (n-k)^2+(n-k)+k(n-d+1). \end{aligned}$$

    If \(k\ne n\), then \(d \ge k\), which is not possible. Hence \(k=n\).

In both the aforementioned cases, we have \(k=n\) and therefore we can apply Lemma 3.2 and (c) of Lemma 3.1 to get the first part of the assertion. Now, suppose that \(d<n\) and that \(K({C})\simeq {\mathbb {F}}_{q^{2\ell }}\) contains properly a field isomorphic to \({\mathbb {F}}_{q^2}\). Then C can be seen as subset of Hermitian matrices of order \(n/\ell \) over \(\mathbb {F}_{q^{2\ell }}\) with minimum distance \(d'=d/\ell \). By (1) we have that

$$\begin{aligned} |{C}|=q^{n(n-d+1)}\le q^{\frac{n}{\ell }\left( \frac{n}{\ell }-d'+1\right) }, \end{aligned}$$

from which we get \(\ell =1\) and also the second part of the statement follows. \(\square \)

Lemma 3.4

If C is a Hermitian maximum additive d-code and an \((n-d)\)-design with \(d<n\). Then there is at least one invertible matrix in C.

Proof

If \(d=1\), then \({C}=\mathrm{H_n(q^2)}\) and the assertion holds. So assume that \(1<d<n\): our aim is to prove that \(A_n \ne 0\). By Theorem 2.2, we have that

$$\begin{aligned} A_{n-i}=\sum _{j=i}^{n-d} (-1)^{j-i}(-q)^{\left( {\begin{array}{c}j-i\\ 2\end{array}}\right) } \left[ \begin{matrix} j \\ i \end{matrix} \right] _{}\left[ \begin{matrix} n \\ j \end{matrix} \right] _{}\left( \frac{|{C}|}{q^{nj}}(-1)^{(n+1)j}-1 \right) , \end{aligned}$$

for each \(i \in \{0,1,\ldots ,n-1\}\). For \(i=0\), we get

$$\begin{aligned} A_{n}=\sum _{j=0}^{n-d} (-1)^{j}(-q)^{\left( {\begin{array}{c}j\\ 2\end{array}}\right) } \left[ \begin{matrix} j \\ 0 \end{matrix} \right] _{}\left[ \begin{matrix} n \\ j \end{matrix} \right] _{}\left( \frac{|{C}|}{q^{nj}}(-1)^{(n+1)j}-1 \right) . \end{aligned}$$
(6)

Recalling that \(|{C}|=q^{n(n-d+1)}\), the above formula can be written as follows

$$\begin{aligned} A_{n}= & {} \sum _{j=0}^{n-d} (-1)^{j}(-q)^{\left( {\begin{array}{c}j\\ 2\end{array}}\right) } \left[ \begin{matrix} n \\ j \end{matrix} \right] _{}\left( q^{n(n-d-j+1)}-1 \right) \\\equiv & {} -\sum _{j=0}^{n-d} (-1)^{j}(-q)^{\left( {\begin{array}{c}j\\ 2\end{array}}\right) } \left[ \begin{matrix} n \\ j \end{matrix} \right] _{} \pmod {q^{n-d}} \\\equiv & {} -\sum _{j=0}^{n} (-1)^{j}(-q)^{\left( {\begin{array}{c}j\\ 2\end{array}}\right) } \left[ \begin{matrix} n \\ j \end{matrix} \right] _{} +\sum _{j=n-d+1}^{n} (-1)^{j}(-q)^{\left( {\begin{array}{c}j\\ 2\end{array}}\right) } \left[ \begin{matrix} n \\ j \end{matrix} \right] _{} \pmod {q^{n-d}} \\\equiv & {} -\sum _{j=0}^{n} (-1)^{j}(-q)^{\left( {\begin{array}{c}j\\ 2\end{array}}\right) } \left[ \begin{matrix} n \\ j \end{matrix} \right] _{} \pmod {q^{n-d}}. \end{aligned}$$

Therefore, by Eq. (4) we have \(A_n \equiv -1 \pmod {q^{n-d}}\), so that \(A_n\ne 0\). \(\square \)

We are ready to prove the main result of this section.

Theorem 3.5

If \({C}_1\) and \({C}_2\) are two maximum additive Hermitian d-codes and \((n-d)\)-designs with \(d<n\), then they are equivalent in \(\mathrm{H}_n(q^2)\) if and only if they are extended equivalent.

Proof

Clearly, if \({C}_1\) and \({C}_2\) are equivalent in \(\mathrm{H}_n(q^2)\), then they are also extended equivalent. Now assume that \({C}_1\) and \({C}_2\) are extended equivalent, i.e. there exist two invertible matrices \(A,B \in \mathrm {GL}(n,q^2)\), \(\rho \in \mathrm {Aut}({\mathbb {F}}_{q^2})\) and \(R \in {\mathbb {F}}_{q^2}^{n\times n}\) such that

$$\begin{aligned} {C}_1=A {C}_2^\rho B +R. \end{aligned}$$

Since \({C}_1\) and \({C}_2\) are additive, we may assume that \(R=O\), i.e. \({C}_1=A {C}_2^\rho B\). We are going to prove that \(A=zB^*\) for some \(z \in {\mathbb {F}}_{q}^*\). So,

$$\begin{aligned} {C}_2=A {C}_1^\sigma B=(A(B^*)^{-1})B^*{C}_1^\sigma B=M{C}_3, \end{aligned}$$

where \(M=A(B^*)^{-1}\) and \({C}_3=B^*{\mathcal {C}}_1^\sigma B \subseteq \mathrm{H}_n(q^2)\). As a consequence, we have that \(MX \in \mathrm{H}_n(q^2)\) for each \(X \in {C}_3\), i.e.

$$\begin{aligned} MX=(MX)^*=XM^* \end{aligned}$$

for all \(X \in {C}_3\). Hence the matrix

$$\begin{aligned} \left( \begin{array}{c@{\quad }c} M &{} O \\ O &{} M^* \end{array} \right) \in K({C}_3). \end{aligned}$$

By Lemma 3.4, there exists in \({C}_3\) an invertible matrix, which implies the existence of \(a \in {\mathbb {F}}_{q}\) and \(D \in \mathrm {GL}(n,q)\) such that \(I_n\in a D^*{C}_3 D\). Now, by Theorem 3.3 we have that \(K({C}_3)={\mathbb {F}}_{q^2}\) and hence \(M=z I_n\) for some \(z \in {\mathbb {F}}_{q^2}^*\). By (c) of Lemma 3.1, we have

$$\begin{aligned} K({C}_3)=\{\gamma I_{n+n} :\gamma \in {\mathbb {F}}_{q^2}\}, \end{aligned}$$

and as \(\left( \begin{array}{c@{\quad }c} M &{} O \\ O &{} M^* \end{array} \right) \in K({C}_3)\), it follows that \(M=M^*=z I_n\), with \(z \in {\mathbb {F}}_{q}^*\), i.e. \(A=zB^*\). \(\square \)

As a consequence of Theorem 2.1, we get the following.

Corollary 3.6

If \({C}_1\) and \({C}_2\) are two Hermitian maximum additive d-codes with d odd, \(d<n\), then they are equivalent in \(\mathrm{H}_n(q^2)\) if and only if they are extended equivalent.

4 Idealisers are not distinguishers in \(\mathrm{H}_n(q^2)\)

In the classical rank metric context, to establish whether two codes are equivalent or not could be quite difficult. One of the strongest tool for such a issue is given by the automorphism groups of such codes, which usually is very hard to determine. In some cases it is enough to study some subgroups of the automorphism group which are invariant under the equivalence, which are easier to calculate, such as the idealisers introduced in [15] and deeply investigated in [19].

Let C be an additive rank metric code in \({\mathbb {F}}_{q}^{n\times n}\), its left idealiser \(I_\ell ({C})\) is defined as

$$\begin{aligned} I_\ell ({C})=\{Z \in {\mathbb {F}}_{q}^{n\times n} :ZX \in {C} \,\,\text {for all}\,\, X \in {C}\} \end{aligned}$$

and its right idealiser \(I_r({C})\) is defined as

$$\begin{aligned} I_r({C})=\{Z \in {\mathbb {F}}_{q}^{n\times n} :XZ \in {C} \,\,\text {for all}\,\, X \in {C}\}. \end{aligned}$$

Idealisers have been used to distinguish examples of MRD-codes, see [1, 5, 6, 8, 16, 19, 20, 27, 31]. In the next we prove that for maximum additive Hermitian d-codes left and right idealisers are isomorphic to \({\mathbb {F}}_{q}\), i.e. they cannot be used as distinguishers in the Hermitian setting.

Theorem 4.1

Let C be a maximum Hermitian additive d-code and a \((n-d)\)-design with \(d<n\). Then \(I_\ell ({C})\) and \(I_r({C})\) are both isomorphic to \({\mathbb {F}}_{q}\).

Proof

Let us consider the left idealiser case and let \(M \in I_\ell ({C})\). We have that \(MX \in \mathrm{H}_n(q^2)\) for each \(X \in {C}\), i.e.

$$\begin{aligned} MX=(MX)^*=XM^* \end{aligned}$$

for all \(X \in {C}\). Hence the matrix

$$\begin{aligned} \left( \begin{array}{c@{\quad }c} M &{} O \\ O &{} M^* \end{array} \right) \in K({C}), \end{aligned}$$

and as in the proof of Theorem 3.5, we get that \(M=a I_n\) for some \(a \in {\mathbb {F}}_{q}\). Similar arguments imply the same result for the right idealiser. \(\square \)

As a consequence of Theorem 2.1, we get the following.

Corollary 4.2

If C is a maximum Hermitian additive d-code with d odd, \(d<n\). Then \(I_\ell ({C})\) and \(I_r({C})\) are both isomorphic to \({\mathbb {F}}_{q}\).

5 The q-polynomial setting and some combinatorial properties

We briefly introduce the Hermitian setting from a polynomial point of view. Let \(n \in \mathbb {Z}^+\) be a positive integer, and let q be a prime power. We denote by \(\mathcal {L}_{n,q}\) the quotient \({\mathbb {F}}_q\)-algebra of the algebra of linearized polynomials over \({\mathbb {F}}_{q^n}\) with respect to \((x-x^{q^n})\), i.e.

$$\begin{aligned}\mathcal {L}_{n,q}=\left\{ \sum _{i=0}^{n-1} a_i x^{q^i} :a_i \in {\mathbb {F}}_{q^n} \right\} . \end{aligned}$$

It is well known that there is a one-to-one correspondence between the elements of \(\mathcal {L}_{n,q}\) and the \(\mathbb {F}_q\)-linear transformation of \({\mathbb {F}}_{q^n}\) (represented as matrices). Using this fact and following the point of view expressed in [16], we may identify the set \(\mathrm{H}_n(q^2)\) of Hermitian matrices of order n over \({\mathbb {F}}_{q^{2}}\) with the set of \(q^2\)-polynomials

$$\begin{aligned}{{\mathcal {H}}}_n(q^2)=\left\{ \sum _{i=0}^{n-1} c_i x^{q^{2i}} :c_{n-i+1}=c_i^{q^{2n-2i+1}}, \,\text { with } \, i \in \{0,\ldots ,n-1\} \right\} \subseteq \mathcal {L}_{n,q^2}, \end{aligned}$$

where the indices are taken modulo n. We underline here that if n is odd, then \(c_{(n+1)/2} \in {\mathbb {F}}_{q^n}\). Moreover, the rank of a Hermitian form equals the dimension of the image of the map \(f \, : \, {\mathbb {F}}_{q^{2n}} \rightarrow {\mathbb {F}}_{q^{2n}}\), where \(f \in {{\mathcal {H}}}_n(q^2)\).

Also, we may consider the maps that preserve the rank distance in \(\mathrm{H}_{n}(q^2)\) represented as polynomials. In order to do this, consider the non-degenerate symmetric bilinear form of \({\mathbb {F}}_{q^{2n}}\) over \({\mathbb {F}}_{q^2}\) defined by

$$\begin{aligned} \langle x,y\rangle = {{\,\mathrm{Tr}\,}}_{q^{2n}/q^2}(xy), \end{aligned}$$

for each \(x,y \in {\mathbb {F}}_{q^{2n}}\), where \( {{\,\mathrm{Tr}\,}}_{q^{2n}/q^2}(x)=\sum \nolimits _{i=0}^{n-1}x^{q^{2i}}\). Then the adjoint \(f^\top \) of the linearized polynomial \( f(x)=\sum \nolimits _{i=0}^{n-1} a_ix^{q^{2i}} \in \mathcal {L}_{n,q^2}\) with respect to the bilinear form \(\langle ,\rangle \) is

$$\begin{aligned} f^\top (x)=\sum _{i=0}^{n-1} a_i^{q^{n-2i}}x^{q^{n-2i}}, \end{aligned}$$

i.e.

$$\begin{aligned} {{\,\mathrm{Tr}\,}}_{q^{2n}/q^2}(xf(y))={{\,\mathrm{Tr}\,}}_{q^{2n}/q^2}(y{f}^\top (x)), \end{aligned}$$

for any \(x,y \in {\mathbb {F}}_{q^{2n}}\).

Then, one can easily verify that maps preserving the rank distance in \(\mathrm{H}_{n}(q^2)\) are of the form

$$\begin{aligned} \varTheta _{a,g,\rho ,r_0}(f) = ag \circ f^{\rho } \circ g^{{\top }q^{2n-1}}(x) + r_0(x), \end{aligned}$$
(7)

for given \(a \in {\mathbb {F}}^*_{q}\), \(\rho \in \mathrm {Aut}({\mathbb {F}}_{q^2})\), \(g(x)=\sum \nolimits _{i=0}^{n-1}g_ix^{q^i}\) a permutation \(q^2\)-polynomial over \({\mathbb {F}}_{q^{2n}}\), \(r_0 \in {{\mathcal {H}}}_{n}(q^2)\) and \(g^{{\top }q^{2n-1}}(x)=\sum \nolimits _{i=0}^{n-1} g_i^{q^{n-2i-1}}x^{q^{n-2i}}\).

In this context, if \({\mathcal {C}}_1\) and \({\mathcal {C}}_2\) are two subsets of \({{\mathcal {H}}}_{n}(q^2)\) and there exists a map \(\varTheta _{a,g,\rho ,r_0}\) defined as in Eq. (7) for certain a, g, \(\rho \) and \(r_0\) such that

$$\begin{aligned} {\mathcal {C}}_2 :=\{\varTheta _{a,g,\rho ,r_0}(f): f\in {\mathcal {C}}_1 \},\end{aligned}$$

then we say that \({\mathcal {C}}_1\) and \({\mathcal {C}}_2\) are equivalent in \({{\mathcal {H}}}_{n}(q^2)\).

As we are considering d-codes using linearized polynomials, we can interpret the dual code \({\mathcal {C}}^{\perp }\) of \({\mathcal {C}}\) in the following way:

$$\begin{aligned} {\mathcal {C}}^{\perp }=\{ f \in {\mathcal {H}}_n(q^2) \, :\, b(f,g)=0, \,\, \forall \,\, g \in {\mathcal {C}}\}, \end{aligned}$$

where

$$\begin{aligned} b(f,g)=\mathrm {Tr}_{q^{2n}/q^2}\left( \sum _{i=0}^{n-1} a_ib_i\right) , \end{aligned}$$
(8)

whenever \(f(x)=\sum \nolimits _{i=0}^{n-1}a_i x^{q^{2i}}\) and \(g=\sum \nolimits _{i=0}^{n-1}b_i x^{q^{2i}} \in {\mathcal {H}}_{n}(q^2)\).

Remark 5.1

As noted in [22, Sect. 2] (see also [17]), there exists an \(\mathbb {F}_{q^2}\)-basis of \(\mathbb {F}_{q^2}^n\) such that \({H}_n(q^2)\) and \(\mathcal {H}_n(q^2)\) are isomorphic (denote by \(\varphi \) such an isomorphism) and with the property that \(\mathrm {tr}(A^*B)=b(\varphi (A),\varphi (B))\). Now, recalling that \(\langle A, B\rangle =1\) if and only if \(b(\varphi (A),\varphi (B))=0\) (as \(\chi \) is a non-trivial character of \(\mathbb {F}_{q}\)), we have that

$$\begin{aligned} \varphi ({C}^\perp )=\mathcal {C}^\perp . \end{aligned}$$

This allows us to switch between the two models.

Here below we give a description of the known examples of maximum Hermitian d-codes in a polynomial fashion, [26, Theorems 4 and 5] (see also [16, Sect. 2.2]). More precisely, let s be an odd positive integer with \(\gcd (s,n)=1\). If n and d are integers with opposite parity such that \(1\le d \le n-1\), then the set

$$\begin{aligned} \mathcal {H}_{n,d,s}=\left\{ \sum _{j=1}^{\frac{n-d+1}{2}} \left( (b_jx)^{q^{2s(n-j+1)}}+b_j^{q^s} x^{q^{2sj}} \right) :b_1,\ldots , b_{\frac{n-d+1}{2}}\in {\mathbb {F}}_{q^{2n}} \right\} , \end{aligned}$$
(9)

is a maximum \({\mathbb {F}}_q\)-linear Hermitian d-code.

In addition, if n and d are both odd integers, then the set

$$\begin{aligned} \mathcal {E}_{n,d,s}= & {} \left\{ (b_0x)^{q^{s(n+1)}}+\sum _{j=1}^{\frac{n-d}{2}} \left( (b_jx)^{q^{s(n+2j+1)}}+b_j^{q^s} x^{q^{s(n-2j+1)}} \right) :\right. \nonumber \\&\quad \left. b_0\in {\mathbb {F}}_{q^n}, b_1,\ldots , b_{\frac{n-d+1}{2}}\in {\mathbb {F}}_{q^{2n}} \right\} , \end{aligned}$$
(10)

is a maximum \({\mathbb {F}}_q\)-linear Hermitian d-code.

We present some combinatorial properties of these examples. In order to do this, let us recall the following result of Gow and Quinlan.

Theorem 5.2

([13, Theorem 5] and [14, Theorem 10]) The dimension of the kernel of a q-polynomial \(f(x)=a_0x+a_1x^{q^s}+\cdots +a_{k-1}x^{q^{s(k-1)}}+a_k x^{q^{sk}}\in \mathcal {L}_{n,q}\) with \(\gcd (s,n)=1\) is at most k. In particular, if the dimension of the kernel of f(x) is k, then \({{\,\mathrm{N}\,}}_{q^n/q}(a_0)=(-1)^{nk}{{\,\mathrm{N}\,}}_{q^n/q}(a_k)\), where \({{\,\mathrm{N}\,}}_{q^n/q}(a)=a^{\frac{q^n-1}{q-1}}\) for \(a \in {\mathbb {F}}_{q^n}\).

The next result provides combinatorial properties of Constructions (9) and (10).

Theorem 5.3

For any suitable parameters nd and s, the maximum \({\mathbb {F}}_q\)-linear d-codes \(\mathcal {H}_{n,d,s}\) and \(\mathcal {E}_{n,d,s}\) are \((n-d+1)\)-designs.

Proof

If d is odd, the assertion follows by Theorem 2.1. So, the remaining codes to be analyzed are \(\mathcal {H}_{n,d,s}\) with n odd and d even. Let start by determining its dual code \(\mathcal {H}_{n,d,s}^{\perp }\) with respect to the bilinear form (8). First, we remark that

$$\begin{aligned} |\mathcal {H}_{n,d,s}^\perp |= \frac{q^{n^2}}{|\mathcal {H}_{n,d,s}|}=q^{n(d-1)}. \end{aligned}$$
(11)

Let us consider the following set

$$\begin{aligned} \mathcal {D}:= & {} \left\{ c_{\frac{n+1}{2}} x^{q^{2s\frac{n+1}{2}}}+ \sum _{i=\frac{n-d+3}{2}}^{\frac{n-1}{2}} c_i x^{q^{2si}}+c_i^{q^{2n-2i+1}}x^{q^{2s(n-i+1)}} :c_{\frac{n+1}{2}} \in {\mathbb {F}}_{q^n},\right. \\&\quad \left. c_i \in {\mathbb {F}}_{q^{2n}}, i \in \left\{ \frac{n-d+3}{2}, \ldots ,\frac{n-1}{2} \right\} \right\} . \end{aligned}$$

It follows that each polynomial f in \(\mathcal {D}\) satisfies the property that

$$\begin{aligned}b(f,h)=0 \,\text { for any }\, h \in \mathcal {H}_{n,d,s}.\end{aligned}$$

Hence, by (11) we have that \(\mathcal {D}=\mathcal {H}_{n,d,s}^\perp \). Let us consider

$$\begin{aligned} \mathcal {D}\circ x^{q^{2s(n-\frac{n-d+3}{2})}}=\{f \circ x^{q^{2s(n-\frac{n-d+3}{2})}} :f(x) \in \mathcal {D} \}. \end{aligned}$$

The polynomials in \(\mathcal {D}\circ x^{q^{2s(n-\frac{n-d+3}{2})}}\) have \(q^{2s}\)-degree less than or equal to \(d-1\), and hence by Theorem 5.2 we have that

$$\begin{aligned} \dim _{{\mathbb {F}}_{q^2}} \ker f(x)= \dim _{{\mathbb {F}}_{q^2}} \ker f \circ x^{q^{2s(n-\frac{n-d+3}{2})}} \le d-1, \end{aligned}$$

for each \(f \in \mathcal {D}{\setminus }\{0\}\), i.e. \(\mathrm {rk}\, f\ge n-d+1\) for each \(f \in \mathcal {D}{\setminus }\{0\}\). Hence \(\mathcal {D}\) is an \((n-d+1)\)-code and the assertion is then proved. \(\square \)

Moreover in [23, 26] another family of additive 2-codes in \({H}_n(q^2)\) was exhibited which exists for any value of the positive integer n. In fact,

$$\begin{aligned} {M} = \{(m_{i,j})_{1\le i,j \le n} \, \in \,\mathrm{H}_n(q^2) \,\, :\,\, m_{i,i}=0 \,\,\,\, \forall \,\, 1 \le i \le n\}, \end{aligned}$$
(12)

see [23, Theorem 6.1]. We are going to show that this example is not a 1-design and hence it cannot be equivalent to the aforementioned families.

By simply adapting arguments exhibited in [24, Sect. 3.4], designs in the Hermitian association scheme can be characterized by means of the following property

Theorem 5.4

Let U be a t-dimensional vector subspace of \(V(n,q^2)={\mathbb {F}}_{q^2}^n\) and let \(H:\,U\times U \rightarrow {\mathbb {F}}_{q^2}\) be a Hermitian bilinear form on U. Then, a d-code \({C} \subset \mathrm{H}_n(q^2)\) is a t-design if and only if the number of forms in C that are an extension of H, is independent of the choice of U and H.

As a consequence, we have the following result.

Theorem 5.5

The 2-code M is not a t-design for any \(t\ne 0\).

Proof

It is enough to show that M is not a 1-design. Indeed, let \(U=\langle (1,0,\ldots ,0)\rangle _{{\mathbb {F}}_{q^2}}\) a one-dimensional subspace of \({\mathbb {F}}_{q^2}^n\). The number of forms in M that are extension of the \(1\times 1\) Hermitian bilinear for \(H=(0)\) is |M|, and the number of forms in M that are extension of the \(1\times 1\) Hermitian bilinear for \(H=(1)\) is 0. Therefore, by Theorem 5.4 we have that M is not a 1-design. \(\square \)

Therefore, we have the following.

Corollary 5.6

The 2-code \(\mathcal {M}\) is not equivalent to \(\mathcal {H}_{n,2,s}\), for any n and s.

As pointed out in Theorem 2.1, any maximum d-code is an \((n-d+1)\)-design when d is odd. For the d even case this is not true. Indeed, by Theorem 5.5, we have example of maximum 2-code which is not even a 1-design, whereas by Theorem 5.3 we have examples of maximum d-codes which are \((n-d+1)\)-designs.

6 New constructions of maximum Hermitian 2-code

We start by pointing out the technique developed in [29], in order to use it in the Hermitian setting similarly to what has been done in [16] in the symmetric framework.

In [29], the following was proved.

Lemma 6.1

Let q be an odd prime power, let \(n \in \mathbb {Z}^+\) and \(s \in \mathbb {Z}\) be two integers such that n is odd and \((s,2n)=1\). Let \(\gamma \in {\mathbb {F}}_{q^{2n}}\) with \({{\,\mathrm{N}\,}}_{q^{2n}/q}(\gamma )\) a non-square in \({\mathbb {F}}_q\). If \(\displaystyle f(x)=a x+ \sum \nolimits _{i=0}^{k-1} a_i x^{{q^{is}}}+\gamma b x^{q^{sk}} \in \mathcal {L}_{2n,q}\) with \(a_i \in {\mathbb {F}}_{q^{2n}}\), \(a,b \in {\mathbb {F}}_{q^n}\), then \(\dim _{{\mathbb {F}}_q} \ker f \le k-1\) and \(\mathrm {rk} \,\,f \ge 2n-k+1\).

Proof

By Theorem 5.2\(\dim _{{\mathbb {F}}_q} \ker f \le k\). By way of contradiction, let us assume that the dimension of the kernel of f(x) is k. Hence, by Theorem 5.2, it follows that

$$\begin{aligned} {{\,\mathrm{N}\,}}_{q^{2n}/q}(a)={{\,\mathrm{N}\,}}_{q^{2n}/q}(b \gamma ), \end{aligned}$$

i.e., since \(a,b \in {\mathbb {F}}_{q^n}\),

$$\begin{aligned} {{\,\mathrm{N}\,}}_{q^{2n}/q}(\gamma )={{\,\mathrm{N}\,}}_{q^{2n}/q}\left( \frac{a}{b}\right) ={{\,\mathrm{N}\,}}_{q^{n}/q}\left( \frac{a}{b}\right) ^2, \end{aligned}$$

which gives a contradiction. The second part follows from the relation \(\mathrm {rk} \,\, f = 2n- \dim _{{\mathbb {F}}_q} \ker \,\, f\). \(\square \)

We are now able to generalize the construction of [16] to the Hermitian setting. Precisely, we have

Theorem 6.2

Let q be an odd prime power, let \(n \in \mathbb {Z}^+\) and \(s \in \mathbb {Z}\) be two integers such that n is odd and \((s,2n)=1\). Let \(\gamma \in {\mathbb {F}}_{q^{2n}}\) with \({{\,\mathrm{N}\,}}_{q^{2n}/q}(\gamma )\) a non-square in \({\mathbb {F}}_q\). Then

$$\begin{aligned} \begin{aligned} \tilde{\mathcal {H}}_s&=\left\{ b x^{q^{2s\frac{n+1}{2}}} + a\gamma x^{q^{2s\frac{n-1}{2}}}+(a\gamma )^{q^{s(n+2)}} x^{q^{2s\frac{n+3}{2}}} + \sum _{i=1}^{\frac{n-3}{2}} \left( c_ix^{q^{2si}}+c_i^{q^{s(2n-2i+1)}}x^{q^{2s(n-i+1)}}\right) \right. \\&\quad \left. :a,b \in {\mathbb {F}}_{q^n}, c_i \in {\mathbb {F}}_{q^{2n}} \right\} . \end{aligned} \end{aligned}$$

is a maximum Hermitian \({\mathbb {F}}_q\)-linear 2-code.

Proof

First we note that \(|\tilde{\mathcal {H}}_s|=q^{2n\frac{n-3}{2}+2n}=q^{n(n-1)}\) which, according to (1), is the maximum possible size providing \(d=2\). Now we have to show that \(\dim _{{\mathbb {F}}_{q^2}} \ker f \le n-2\) for each \(f \in \tilde{\mathcal {H}}_s\). Indeed, if \(\dim _{{\mathbb {F}}_{q^2}} \ker f \le n-2\), then \(\mathrm {rk}\,\, f \ge n-(n-2)=2\).

By way of contradiction, we may suppose that there exists

$$\begin{aligned} f(x)= & {} b x^{q^{2s\frac{n+1}{2}}} + a\gamma x^{q^{2s\frac{n-1}{2}}}+(a\gamma )^{q^{s(n+2)}} x^{q^{2s\frac{n+3}{2}}}\\&+ \sum _{i=1}^{\frac{n-3}{2}} (c_ix^{q^{2si}}+c_i^{q^{s(2n-2i+1)}}x^{q^{2s(n-i+1)}}) \end{aligned}$$

in \(\tilde{\mathcal {H}}_s\) such that \(\dim _{{\mathbb {F}}_{q^2}} \ker \,\,f \ge n-1\). Clearly, the \(\dim _{{\mathbb {F}}_{q^2}} \ker \,\, f = \dim _{{\mathbb {F}}_{q^2}} \ker \,\, f \circ x^{q^{si}}\) for each \(i \in \{0,\ldots ,2n-1\}\). In particular,

$$\begin{aligned} f \circ x^{q^{s(n-3)}}:= & {} b x^{q^{2s(n-1)}} + a\gamma x^{q^{2s(n-2)}}+(a\gamma )^{q^{s(n+2)}} x\\&+ \sum _{i=0}^{\frac{n-3}{2}} c_ix^{q^{s(2i+n-3)}}+c_i^{q^{2n-2i+1}}x^{q^{s(n-2i-1)}} \end{aligned}$$

has \(q^{2s}\)-degree at most \(n-1\) and hence, by Theorem 5.2, it follows that \(\dim _{{\mathbb {F}}_{q^2}}\ker f \le n-1\). When we look at \(f\circ x^{q^{s(n-3)}}\) as a q-polynomial in \({\mathbb {F}}_{q^{2n}}\) we have that \(\dim _{{\mathbb {F}}_q} \ker (f\circ x^{q^{s(n-3)}})=2n-2\); a contradiction by Lemma 6.1. Hence, \(\dim _{{\mathbb {F}}_{q^2}} \ker \,\, f \le n-2\). \(\square \)

Also we are in the position to determine its dual code \(\tilde{\mathcal {H}}^{\perp }_s\) of \(\tilde{\mathcal {H}}_s\). Precisely, we have

Theorem 6.3

Let \(\gamma \in {\mathbb {F}}_{q^{2n}}\) with \(N_{q^{2n}/q}(\gamma )\) a non-square element of \({\mathbb {F}}_q\). Then, the dual code of \(\tilde{\mathcal {H}}_s\) is

$$\begin{aligned} \tilde{\mathcal {H}}_s^\perp =\left\{ c \gamma ^{-1} \alpha x^{q^{2s\left( \frac{n-1}{2}\right) }}+(c\gamma ^{-1} \alpha )^{q^{s(n+2)}}x^{q^{2s\frac{n+3}{2}}} :c \in {\mathbb {F}}_{q^n} \right\} , \end{aligned}$$

with \(\alpha \in {\mathbb {F}}_{q^{2n}}\) and \(\alpha ^{q-1}=-\,1\).

Proof

We have that \(|\tilde{\mathcal {H}}_s^{\perp }|=q^{n^2}/|\tilde{\mathcal {H}}_s|=q^n \). Let

$$\begin{aligned} f(x)= & {} b x^{q^{2s\frac{n+1}{2}}} + a\gamma x^{q^{2s\frac{n-1}{2}}}+(a\gamma )^{q^{s(n+2)}} x^{q^{2s\frac{n+3}{2}}} \\&+ \sum _{i=1}^{\frac{n-3}{2}} \left( c_ix^{q^{2si}}+c_i^{q^{s(2n-2i+1)}}x^{q^{2s(n-i+1)}}\right) \in \tilde{\mathcal {H}}_s \end{aligned}$$

and

$$\begin{aligned} g(x)=c \gamma ^{-1} \alpha x^{q^{2s(\frac{n-1}{2})}}+(c\gamma ^{-1} \alpha )^{q^{s(n+2)}}x^{q^{2s\frac{n+3}{2}}}\end{aligned}$$

with \(c \in {\mathbb {F}}_{q^n}\), then

$$\begin{aligned} b(f,g)= & {} \mathrm {Tr}_{q^{2n}/q^2}\left( ac \alpha + (ac \alpha )^{q^{s(n+2)}}\right) =\mathrm {Tr}_{q^{2n}/q^2}\left( ac \alpha + ac \alpha ^{q}\right) \\= & {} \mathrm {Tr}_{q^{2n}/q^2}\left( ac \alpha \left( 1+\alpha ^{q-1}\right) \right) =0. \end{aligned}$$

The assertion then follows. \(\square \)

Corollary 6.4

The 2-code \(\tilde{\mathcal {H}}_s\) is an \((n-1)\)-design.

Proof

To prove the assertion, it is enough to show that all the polynomials in \(\tilde{\mathcal {H}}_s^\perp \) are invertible. For this purpose, let

$$\begin{aligned}f(x)= c \gamma ^{-1} \alpha x^{q^{2s(\frac{n-1}{2})}}+(c\gamma ^{-1} \alpha )^{q^{s(n+2)}}x^{q^{2s\frac{n+3}{2}}},\end{aligned}$$

with \(c \in {\mathbb {F}}_{q^n}\) and \(\alpha ^{q-1}=-\,1\).

Clearly, \(f\circ x^{q^{-s(n-1)}}= c \gamma ^{-1} \alpha x+(c\gamma ^{-1} \alpha )^{q^{s(n+2)}}x^{q^{2s}}\). It has a nonzero root if and only if

$$\begin{aligned} {{\,\mathrm{N}\,}}_{q^{2n}/q^2}\left( (c \alpha \gamma ^{-1})^{1-q^{s(n+2)}} \right) =-\,1. \end{aligned}$$

Since

$$\begin{aligned}{{\,\mathrm{N}\,}}_{q^{2n}/q^2}\left( c^{1-q^{s(n+2)}}\alpha ^{1-q^{s(n+2)}} \gamma ^{q^{s(n+2)}-1} \right) = -{{\,\mathrm{N}\,}}_{q^{2n}/q^2}\left( \gamma ^{q-1} \right) . \end{aligned}$$

Therefore, \(c \gamma ^{-1} \alpha x+(c\gamma ^{-1} \alpha )^{q^{s(n+2)}}x^{q^{2s}}=0\) has a no-zero solution, if and only if

$$\begin{aligned} {{\,\mathrm{N}\,}}_{q^{2n}/q^2}\left( \gamma ^{q-1} \right) =1, \end{aligned}$$

which implies that \({{\,\mathrm{N}\,}}_{q^{2n}/q^2}\left( \gamma \right) \in {\mathbb {F}}_q\). This is a contradiction since \({{\,\mathrm{N}\,}}_{q^{2n}/q}(\gamma )\) is a non-square in \({\mathbb {F}}_q\). \(\square \)

Finally, we prove that construction exhibited in Theorem 6.2 is equivalent to none of the known examples with involved parameters. We need the following tools from [18], used by the authors in order to solve the equivalence issue for the family of generalized twisted Gabidulin codes.

Let \(\mathcal {C}\) be a subset of \(\mathcal {L}_{n,q}\). The universal support \(\mathcal {S}({\mathcal {C}})\) of \({\mathcal {C}}\) is the subset of \(\{0,1,\ldots ,n-1\}\) defined as follows

$$\begin{aligned} \mathcal {S}({\mathcal {C}})=\{i:\text {there exists}\,\,f \in {\mathcal {C}}\,\,\text {such that the}\,\,q^i\text {-coefficient of}\,\, f \,\,\text {is not zero}\}, \end{aligned}$$

whereas an independent support B is a subset of \(\{0,1,\ldots ,n-1\}\) for which there exists a set \(\{h_i :i \in B\}\) of permutations of \({\mathbb {F}}_{q^{n}}\) such that

$$\begin{aligned} \left\{ \sum _{i \in B} h_i(a)x^{q^i} :a \in {\mathbb {F}}_{q^n} \right\} \subseteq {\mathcal {C}}. \end{aligned}$$

Also, let A and B two subsets of \(\{0,1,\ldots ,n-1\}\), then

$$\begin{aligned} A^B:=\{k :\text {there exists a unique pair}\,\,(i,j)\in A\times B\,\,\text {such that}\,\, k\equiv i+j \pmod {n}\}. \end{aligned}$$

For two extended equivalent codes the following holds.

Lemma 6.5

[18, Lemma 4.6] Let \({\mathcal {C}}_1\) and \({\mathcal {C}}_2\) two subsets of \(\mathcal {L}_{n,q}\). Assume that \({\mathcal {C}}_1\) and \({\mathcal {C}}_2\) are extended equivalent, i.e. \(\tau ({\mathcal {C}}_1)={\mathcal {C}}_2\) for some \(\tau \) as in (3). Let A be the support of \(\{\tau (ax):a \in {\mathbb {F}}_{q^n}\}\). Then

$$\begin{aligned} A^B\subseteq \mathcal {S}({\mathcal {C}}_2), \end{aligned}$$

for every independent support.

Now, we are ready to prove our final result.

Theorem 6.6

The 2-code \(\tilde{\mathcal {H}}_s\) is new.

Proof

We first remind that, by Theorem 5.5, the 2-code M described in (12), is not a t-design for any \(t\ne 0\). Then, by Corollary 6.4, it is plain that \(\tilde{\mathcal {H}}_s\) cannot be equivalent to M.

On the other hand, assume by way of contradiction that \(\tilde{\mathcal {H}}_s\) is extended equivalent to \({\mathcal {H}}_{n,2,\ell }\). Since both codes are \((n-1)\)-designs, as a direct consequence of Theorem 3.5 and Corollary 3.6, then they have to be equivalent in \(\mathcal {H}_n(q^2)\), i.e. there must be a map of type \(\varTheta _{a,g^{\top q},\rho }\) such that \(\varTheta _{a,g^{\top q},\rho }(\tilde{{\mathcal {H}}}_s)={\mathcal {H}}_{n,2,\ell }\), for given \(a \in {\mathbb {F}}^*_{q}\), \(\rho \in \mathrm {Aut}({\mathbb {F}}_{q^2})\), and \(g(x)=\sum \nolimits _{i=0}^{n-1} g_i x^{q^{2i}}\) a permutation \(q^2\)-polynomial over \({\mathbb {F}}_{q^{2n}}\).

In what follows we will first prove that under this assumption, it must necessarily be \(\ell \equiv \pm \, s \,(mod\,n)\). In fact, suppose that \(\ell \not \equiv \pm \, s\). As n is odd, we must have that \((\ell ,n)=1\), and hence there must be an \(1<l<n-1\) such that \(s\equiv l\ell \,(mod\,n)\).

Let A be the universal support of \(\{g^{\top q}\circ a x \circ g(x) :a \in {\mathbb {F}}_{q^{2n}}\}\), and \({\mathcal S}({\mathcal {H}}_{n,2,\ell })\) be the universal support of \({\mathcal {H}}_{n,2,\ell }\). By applying Lemma 6.5 we get that \(A^B \subseteq \mathcal {S}({\mathcal {H}}_{n,2,\ell })\) for each set of independent supports B of \(\tilde{{\mathcal {H}}}_s\).

Now, consider the set

$$\begin{aligned}\bigg \{is, (2n-2i+1)s\, :\, i=1,2,\ldots ,\frac{n-1}{2}\bigg \} \bigg \},\end{aligned}$$

which is a set of independent supports of \(\tilde{{\mathcal {H}}}_s\).

If \(j\in A\), applying again Lemma 6.5, we get that

$$\begin{aligned}\bigg \{ j+is:\, j+(2n-2i+1)s \,:\, i \in \bigg \{1,2,\ldots ,\frac{n-1}{2}\bigg \} \bigg \} \subseteq {\mathcal S}({\mathcal {H}}_{n,2,\ell }).\end{aligned}$$

Hence,

$$\begin{aligned}&\bigg \{j+is; \,\,j+ (2n-2i+1)s \,\,:\, i \in \bigg \{1,2,\ldots ,\frac{n-1}{2} \bigg \} \bigg \}\\&\quad \subseteq \bigg \{i\ell ; (2n-i+1)\ell \,:\, i \in \bigg \{1,2,\ldots ,\frac{n-1}{2} \bigg \} \bigg \}. \end{aligned}$$

Letting  \(j \equiv u\ell \,(mod\,n)\) with \(u\in \bigg \{1,2,\ldots ,\frac{n-1}{2}\bigg \}\) in above equation, and plugging in \(s \equiv l\ell \,(mod\,n)\), we get

$$\begin{aligned}&\bigg \{u+il \,\text { and } u+l(2n-i+1) \, :\, i=1,\ldots ,\frac{n-1}{2}\bigg \} \\&\quad \subseteq \bigg \{i, n-i+1 \,:\, i=1,\ldots ,\frac{n-1}{2}\bigg \}.\end{aligned}$$

But since \(l \ge 2\) and \(u\in \bigg \{1,2,\ldots ,\frac{n-1}{2}\bigg \}\), this can never be the case. Hence, we end up with \(\ell \equiv \pm \, s \,(mod\,n)\).

In this case consider the map \(g^{\top q}\circ b^\rho x^{q^{2s\frac{n+1}{2}}} \circ g\). A direct computation shows that the coefficient of the term with q-degree \(q^{2s\frac{n+1}{2}}\) in it, equals to

$$\begin{aligned} a_{\frac{n+1}{2}}(b)=\sum ^{n-1}_{i=0} g^{q^{s(2n-2i+1)}}_{i}\,\,g_{i}^{q^{s2(\frac{n+1}{2} -i)}}b^{\rho q^{s2(n-i)}}. \end{aligned}$$

Since \((s,2n)=1\), the coefficients \(g^{q^{s(2n-2i+1)}}_{i}\,\,g_{i}^{q^{s2(\frac{n+1}{2} -i)}}\) belong to \({\mathbb {F}}_{q^n}\). As the coefficient of the term with \(q^{2\ell }\)-degree \(\frac{n+1}{2}\) in \({\mathcal {H}}_{n,2,\ell }\) is zero, and since \(\ell \equiv \pm \, s \pmod {n}\), we get that \(a_{\frac{n+1}{2}}(b)\) must be zero for each \(b \in {\mathbb {F}}_{q^n}\). But this finally contradicts the fact that g is a permutation polynomial.

Hence, we may conclude that \(\tilde{{\mathcal {H}}}_s\) is equivalent to none of the two existing examples with the involved parameters. \(\square \)

7 Concluding remarks and open problems

In this article we provide some conditions ensuring the identification of the two types of equivalences which can be naturally defined for maximum additive d-codes in the Hermitian association scheme. More precisely in Theorem 3.5 we prove that the equivalence and the extended equivalence coincide for maximum additive Hermitian d-codes with \(d<n\) which are also \((n-d)\)-designs. As a byproduct, in Corollary 3.6 we prove that the equivalence and the extended equivalence coincide, whenever we deal with two maximum additive Hermitian d-codes with \(d<n\) and d odd. However, it is an open question whether or not this holds true also for maximum additive Hermitian d-codes with \(d<n\) and d even, which are not \((n-d)\)-designs.

Also, it would be interesting to understand whether the same result holds for maximum additive codes in the alternating setting. In addition, we do not know whether Lemma 6.1 may be used for constructing new examples of 2-codes in such a context.

Furthermore, one of the most important open problems regards the construction of maximum Hermitian d-codes for \(3<d<n-1\) with n and d both even. Probably, further investigations on the relations between the coefficients of a linearized polynomial and the dimension of its kernel (i.e. by using results contained in [4, 7, 21]) may lead to new constructions for some fixed value of n.