1 Introduction

In [1], the notion of hulls has been introduced and applied in the characterization of finite projective planes. In [3, 4, 8, 10], it has been shown that the complexity of some algorithms in coding theory can be determined by the hull dimension of codes. Precisely, most of the algorithms work for linear codes with small hull. Due to their wide applications, hulls of linear codes have been of interest and extensively studied [9]. Recently, hulls of linear codes has been revisited and applied in constructions of good quantum codes in [2, 5], and [11].

As mentioned in [3, 4, 8, 10], most of their algorithms work if the hull is small. It is therefore of interest to study linear codes with small hull dimension. In [6], techniques used in [7] have been extended to construct optimal linear codes with Euclidean hull dimension one over \({\mathbb {F}}_2\) and \({\mathbb {F}}_3\). Here, we extend the idea from [6] and [7] to construct optimal \([n,2]_4\) codes with Hermitian hull dimension one for all lengths \(n\ge 3\), such that \(n \equiv 1,2,4 \ (\mathrm{mod}\ 5)\). For the cases \(n \equiv 0,3 \ (\mathrm{mod}\ 5)\), good upper and lower bounds on the minimum weight of \([n,2]_4\) codes with Hermitian hull dimension one are derived.

The paper is organized as follows. Some basic concepts of Hermitian hulls of linear codes and construction ideas are given in Sect. 2. Optimal \([n,2]_4\) codes with Hermitian hull dimension one are established in Sect. 3 for all lengths \(n\ge 3\), such that \(n \equiv 1,2,4 \ (\mathrm{mod}\ 5)\). Good lower and upper bounds on the minimum weight of quaternary \([n,2]_4\) codes with Hermitian hull dimension one are given in Sect. 4. Summary and remarks are provided in Sect. 5.

2 Preliminaries

In this section, a brief discussion on linear codes and their Hermitian hull is given as well as the construction ideas for linear codes with prescribed Hermitian hull dimension.

2.1 Linear codes

A linear code of length n over a finite field \({\mathbb {F}}_q\) is defined to be a subspace of the \({\mathbb {F}}_{q}\)-vector space \({\mathbb {F}}_{q}^n\). A linear code over \({\mathbb {F}}_4\) will be referred to as a quaternary linear code. The Hamming weight of an element \({\varvec{w}}=(w_1,w_2,\dots ,w_n) \in {\mathbb {F}}_{q}^n\) is defined to be \(\mathrm{wt}({\varvec{w}})=|\{i\in \{1,2,\dots ,n\}\mid w_i\ne 0\}|\) and the minimum Hamming weight of a linear code C is defined to be \(\mathrm{wt}(C) =\min \{ \mathrm{wt}({\varvec{c}}) \mid {\varvec{c}}\in C\setminus \{{\varvec{0}}\} \}\). A linear code of length n over \({\mathbb {F}}_q\) will be referred as an \([n,k,d]_q\) code if the dimension of C is k and the minimum Hamming weight of C is d, or an \([n,k]_q \) code if the minimum Hamming weight of C is not specified. A \(k\times n \) matrix G over \({\mathbb {F}}_q\) is called a generator matrix of an \( [n,k]_q\) code C if the rows of G form a basis of C. For a \(k\times n\) matrix \(A=[a_{ij}]\) over \({\mathbb {F}}_q\), denote by \(A^T=[a_{ji}]\) the transpose of A. In addition, if q is square, denote by \(A^\dagger =[a_{ji}^{\sqrt{q}}]\) the conjugate transpose of A.

For a square prime power q, the Hermitian inner product between elements \({\varvec{u}}=(u_1,u_2,\dots ,u_n) \) and \({\varvec{v}}=(v_1,v_2,\dots ,v_n) \) in \( {\mathbb {F}}_{q}^n\) is defined to be:

$$\begin{aligned} \langle {\varvec{u}}, {\varvec{v}}\rangle _{\mathrm{H}}=\sum _{i=1}^n u_iv_i^{\sqrt{q}}. \end{aligned}$$

The Hermitian dual of a linear code C of length n over \({\mathbb {F}}_q\) is defined to be:

$$\begin{aligned} C^{\perp _{\mathrm{H}}} =\{ {\varvec{u}}\in {\mathbb {F}}_q^n \mid \langle {\varvec{u}}, {\varvec{c}}\rangle _{\mathrm{H}} =0 \text { for all } {\varvec{c}} \in C \}. \end{aligned}$$

The Hermitian hull of C is defined to be \(\mathrm{Hull}_{\mathrm{H}} (C)=C\cap C^{\perp _{\mathrm{H}}}\).

The Hermitian hull dimension of a linear code can be determined using its generator matrix in [2] as follows.

Proposition 2.1

([2, Propositions 3.2]) Let q be a square prime power and let C be an \([n,k,d]_q\) code with generator matrix G. Then, \(rank(GG^\dagger )\) is independent of G and:

$$\begin{aligned} \dim (\mathrm{Hull}_{\mathrm{H}}(C)) = k-\mathrm{rank}(GG^\dagger ). \end{aligned}$$

2.2 Constructions and bounds

For a square prime power q, positive integers nk, and non-negative integer \(\ell \), let:

$$\begin{aligned} D_q^{\mathrm{H}}(n,k, \ell ) := \max \{d \mid \exists \text { an } [n,k,d]_q \ \text { code with } \dim (\mathrm{Hull}_{\mathrm{H}} (C)) =\ell \}. \end{aligned}$$

Based on the Griesmer Bound and the arguments similar to those in the proof of [6, Lemma 2.1], \(D_q^{\mathrm{H}}(n,k, \ell )\) can be derived in the following lemma.

Lemma 2.2

Let q be a square prime power, and let nk and \(\ell \) be integers such that \(1\le k\le n\) and \(0\le \ell \). Then:

From now on, we focus on quaternary linear codes of dimension two and Hermitian hull dimension one. By setting \(k =2\) and \(q = 4\) in Lemma 2.2, the next lemma follows.

Lemma 2.3

for all integers \(n\ge 3\).

Using the analysis on a generator matrix of a linear code similar to that of [7] and [6], we derived the following results.

Let \({\mathbb {F}}_4=\{0,1,\omega , \omega ^2=\omega +1\}\) and let C be an \([n,2]_4\) code over \({\mathbb {F}}_4\) with generator matrix:

$$\begin{aligned} G = \begin{bmatrix} a_{11} &{}a_{12} &{}\cdots &{}a_{1n} \\ a_{21} &{} a_{22} &{} \cdots &{}a_{2n} \end{bmatrix}. \end{aligned}$$

By setting \(\beta _l = \begin{bmatrix} a_{1l}\\ a_{2l} \end{bmatrix}\) for all \(1 \le l \le n\), the matrix G can be viewed of the form:

$$\begin{aligned} G = \begin{bmatrix} \beta _{1}&\beta _{2}&\cdots&\beta _{n} \end{bmatrix}. \end{aligned}$$
(2.1)

For \(i,j \in {\mathbb {F}}_4\), let \(S_{ij} := |\{ l \in \{1,2,\dots ,n\} \mid \begin{bmatrix} i\\ j \end{bmatrix} = \beta _l \}|\). It is not difficult to see that the generator matrix G and the code C are determined explicitly by the values \(S_{ij}\) for all \(i,j \in {\mathbb {F}}_4\). For constructions of quaternary linear codes, it suffices to establish the values \(S_{ij}\).

Alternatively, let \(\alpha _1 = \begin{bmatrix} a_{11}&a_{12}&\cdots&a_{1n} \end{bmatrix}\) and \(\alpha _2 = \begin{bmatrix} a_{21}&a_{22}&\cdots&a_{2n} \end{bmatrix}\). Then, G and C can be viewed as: \(G = \begin{bmatrix} \alpha _1 \\ \alpha _2 \end{bmatrix}\) and

$$\begin{aligned} C&= \{0, \alpha _1, \alpha _2, \omega \alpha _1,\omega ^2\alpha _1, \omega \alpha _2, \omega ^2\alpha _2, \alpha _1+\alpha _2, \omega \alpha _1+\alpha _2, \\&\omega ^2\alpha _1+\alpha _2, \alpha _1+ \omega \alpha _2, \alpha _1+ \omega ^2\alpha _2, \omega \alpha _1+\omega \alpha _2, \\&\omega ^2\alpha _1+\omega \alpha _2, \omega \alpha _1+\omega ^2\alpha _2, \omega ^2\alpha _1+\omega ^2\alpha _2 \}, \end{aligned}$$

respectively.

By inspection, it is easily seen that:

$$\begin{aligned} \text {wt}(\alpha _1)&= \text {wt}(\omega \alpha _1) = \text {wt}(\omega ^2\alpha _1) = \sum _{i \in {\mathbb {F}}_4^*} \sum _{j \in {\mathbb {F}}_4}S_{ij} , \end{aligned}$$
(2.2)
$$\begin{aligned} \text {wt}(\alpha _2)&= \text {wt}(\omega \alpha _2) = \text {wt}(\omega ^2\alpha _2) = \sum _{i \in {\mathbb {F}}_4} \sum _{j \in {\mathbb {F}}_4^*}S_{ij}, \end{aligned}$$
(2.3)
$$\begin{aligned} \text {wt}(\alpha _1 + \alpha _2)&= \text {wt}(\omega \alpha _1 + \omega \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega ^2\alpha _2) = \sum _{i \in {\mathbb {F}}_4} \sum _{j \in {\mathbb {F}}_4, i \ne j}S_{ij}, \end{aligned}$$
(2.4)
$$\begin{aligned} \text {wt}(\alpha _1 + \omega \alpha _2)&= \text {wt}(\omega \alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega ^2\alpha _1 + \alpha _2) = \sum _{i \in {\mathbb {F}}_4} \sum _{j \in {\mathbb {F}}_4, i \ne \omega j}S_{ij}, \end{aligned}$$
(2.5)

and

$$\begin{aligned} \text {wt}(\alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega \alpha _1 + \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega \alpha _2) = \sum _{i \in {\mathbb {F}}_4} \sum _{j \in {\mathbb {F}}_4, i \ne \omega ^2 j}S_{ij}. \end{aligned}$$
(2.6)

Let \(y_{0} = S_{11} + S_{\omega \omega } + S_{\omega ^2 \omega ^2},\ y_{1} = S_{1\omega ^2} +S_{\omega 1}+S_{\omega ^2\omega }\), and \(y_{2} = S_{\omega ^21} + S_{1\omega } + S_{\omega \omega ^2}\). Then, we have:

$$\begin{aligned} GG^\dagger = \begin{bmatrix} \sum \limits _{i \in {\mathbb {F}}_4^*} \sum \limits _{j \in {\mathbb {F}}_4}S_{ij} &{}~~~ y_{0} + \omega y_{1} + \omega ^2 y_{2}\\ y_{0} + \omega ^2 y_{1} + \omega y_{2} &{} ~~~\sum \limits _{i \in {\mathbb {F}}_4} \sum \limits _{j \in {\mathbb {F}}_4^*}S_{ij} \end{bmatrix}. \end{aligned}$$
(2.7)

The construction is illustrated in the following example.

Example 2.4

Let C be a quaternary linear code of length 4 determined by \(S_{10} = S_{01} = S_{11} = S_{1\omega } = 1\) and \(S_{00} = S_{0\omega } = S_{0\omega ^2} = S_{1\omega ^2} = S_{\omega 0} =S_{\omega 1} = S_{\omega \omega } = S_{\omega \omega ^2} =S_{\omega ^2 0} =S_{\omega ^2 1} =S_{\omega ^2 \omega } =S_{\omega ^2 \omega ^2} =0\). Then, the generator matrix of C is of the form:

$$\begin{aligned} G = \begin{bmatrix} 1 &{} 0 &{} 1 &{} 1 \\ 0 &{} 1 &{} 1 &{} \omega \end{bmatrix}. \end{aligned}$$

Consequently, we have:

$$\begin{aligned} \sum _{i \in {\mathbb {F}}_4^*} \sum _{j \in {\mathbb {F}}_4}S_{ij} =1,~ \sum _{i \in {\mathbb {F}}_4} \sum _{j \in {\mathbb {F}}_4^*}S_{ij} =1,~ y_{0} = 1, ~ y_{1} =0 ~\text { and } y_{2} =1. \end{aligned}$$

By (2.7), it follows that:

$$\begin{aligned} G{G}^\dagger&= \begin{bmatrix} 1 &{} 1 + \omega ^2 \\ 1 + \omega &{} 1 \end{bmatrix} =\begin{bmatrix} 1 &{} \omega \\ \omega ^2 &{} 1 \end{bmatrix}, \end{aligned}$$

which implies that \(\mathrm{rank } ( G{G}^\dagger )= 1\) and \(\dim (\mathrm{Hull}_{\mathrm{H}}(C))=2-\mathrm{rank } ( G{G}^\dagger )=1\), by Proposition 2.1.

These ideas will be applied in the study of optimality and bounds on the minimum Hamming weight of quaternary linear codes with Hermitian hull dimension one in the following sections.

3 Optimal quaternary linear codes with Hermitian hull dimension one

In this section, we focus on constructions of optimal quaternary linear codes with dimension 2 and Hermitian hull dimension one, and establish the exact values of \(D_4^{\mathrm{H}}(n,2, 1) \) for arbitrary lengths \(n\ge 3\), such that \(n \equiv 1,2,4 \ (\mathrm{mod}\ 5)\).

Theorem 3.1

Let \(n\ge 3 \) be an integer. If \(n \equiv 1,2,4 \ (\mathrm{mod}\ 5)\), then:

Proof

Assume that \(n \equiv 1,2,4 \ (\mathrm{mod}\ 5)\). From Lemma  2.3, it follows that:

It remains to show the existence of a code whose Hermitian hull dimension is one.

We consider the constructions in the following 3 cases.

Case 1. \(n \equiv 1 \ (\mathrm{mod}\ 5)\). Then, \(n = 5t+1\) for some positive integer t. Based on the parity of t, we consider the following two subcases.

Case 1.1. t is even. For \(1\le r\le n\), let \(\beta _r\) be the \(2\times 1\) matrix over \({\mathbb {F}}_4\) defined by:

$$\begin{aligned} \beta _r= {\left\{ \begin{array}{ll} {[0~1]}^T &{} \text { if } 1\le r\le \frac{t}{2} ,\\ {[0~\omega ]}^T &{} \text { if } \frac{t}{2}+1\le r\le \frac{2t}{2} ,\\ {[\omega ~0]}^T &{} \text { if } \frac{2t}{2}+1\le r\le \frac{3t}{2} ,\\ {[1~1]}^T &{} \text { if } \frac{3t}{2}+1\le r\le \frac{4t}{2} ,\\ {[\omega ^2~\omega ^2]}^T &{} \text { if } \frac{4t}{2}+1\le r\le \frac{5t}{2} \\ {[1~\omega ^2]}^T &{} \text { if } \frac{5t}{2}+1\le r\le \frac{6t}{2} ,\\ {[\omega ^2~\omega ]}^T &{} \text { if } \frac{6t}{2}+1\le r\le \frac{7t}{2} ,\\ {[\omega ^2~1]}^T &{} \text { if } \frac{7t}{2}+1\le r\le \frac{8t}{2} ,\\ {[\omega ~\omega ^2]}^T &{} \text { if } \frac{8t}{2}+1\le r\le \frac{9t}{2} ,\\ {[1~0]}^T &{} \text { if } \frac{9t}{2}+1\le r\le \frac{10t}{2}+1. \\ \end{array}\right. }. \end{aligned}$$

Let C be an \([n,2]_4\) code generated by \(G=\begin{bmatrix} \beta _1&{}\beta _2&{}\cdots &{} \beta _n\\ \end{bmatrix}\). Then, \(S_{01} = S_{0\omega } =S_{\omega 0} = S_{11} = S_{\omega ^2\omega ^2} = S_{1\omega ^2} = S_{\omega ^2 \omega } = S_{\omega ^21} = S_{\omega \omega ^2} = \frac{t}{2}\), \(S_{10} = \frac{t}{2} + 1\), and \( S_{ij} = 0\) otherwise. It follows that:

$$\begin{aligned} \sum \limits _{i \in {\mathbb {F}}_4^*} \sum \limits _{j \in {\mathbb {F}}_4}S_{ij}&= 1,\\ \sum \limits _{i \in {\mathbb {F}}_4} \sum \limits _{j \in {\mathbb {F}}_4^*}S_{ij}&= 0,\\ y_{0} = S_{11} + S_{\omega \omega } + S_{\omega ^2\omega ^2}&= t,\\ y_{1} = S_{1\omega ^2} + S_{\omega 1} + S_{\omega ^2\omega }&= t, \text { and }\\ y_{2} = S_{\omega ^21} +S_{1\omega } + S_{\omega \omega ^2}&= t. \end{aligned}$$

By (2.7), we have:

$$\begin{aligned} G{G}^\dagger&= \begin{bmatrix} 1 &{} 0 \\ 0&{} 0 \end{bmatrix}, \end{aligned}$$

which implies that \(\mathrm{rank}(GG^\dagger ) = 1\). By Proposition 2.1, C has Hermitian hull dimension \(2- \mathrm{rank}(GG^\dagger )=1\).

By the definition of \(S_{ij}\) and (2.2)–(2.6), it can be deduced that:

$$\begin{aligned} \text {wt}(\alpha _1) = \text {wt}(\omega \alpha _1) = \text {wt}(\omega ^2\alpha _1)&= 4t+1, \\ \text {wt}(\alpha _2) = \text {wt}(\omega \alpha _2) = \text {wt}(\omega ^2\alpha _2)&= 4t,\\ \text {wt}(\alpha _1 + \alpha _2) = \text {wt}(\omega \alpha _1 + \omega \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega ^2\alpha _2)&= 4t+1,\\ \text {wt}(\alpha _1 + \omega \alpha _2) = \text {wt}(\omega \alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega ^2\alpha _1 + \alpha _2)&= 4t+1, \text { and }\\ \text {wt}(\alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega \alpha _1 + \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega \alpha _2)&= 4t+1. \end{aligned}$$

Hence, C has minimum weight . Therefore, C is an optimal code with Hermitian hull dimension one.

Case 1.2. t is odd. For \(1\le r\le n\), let \(\beta _r\) be the \(2\times 1\) matrix over \({\mathbb {F}}_4\) defined by:

$$\begin{aligned} \beta _r= {\left\{ \begin{array}{ll} {[0~\omega ]}^T &{} \text { if } 1\le r\le \frac{t+1}{2} ,\\ {[1~0]}^T &{} \text { if } \frac{t+1}{2}+1\le r\le \frac{2(t+1)}{2} ,\\ {[\omega ~0]}^T &{} \text { if } \frac{2(t+1)}{2}+1\le r\le \frac{3(t+1)}{2} ,\\ {[\omega ^2~\omega ^2]}^T &{} \text { if } \frac{3(t+1)}{2}+1\le r\le \frac{4(t+1)}{2} ,\\ {[\omega ^2~\omega ]}^T &{} \text { if } \frac{4(t+1)}{2}+1\le r\le \frac{5(t+1)}{2} \\ {[\omega ~\omega ^2]}^T &{} \text { if } \frac{5(t+1)}{2}+1\le r\le \frac{6(t+1)}{2} ,\\ {[0~1]}^T &{} \text { if } \frac{6(t+1)}{2}+1\le r\le \frac{7t+5}{2} ,\\ {[1~1]}^T &{} \text { if } \frac{7t+5}{2}+1\le r\le \frac{8t+4}{2} ,\\ {[1~\omega ^2]}^T &{} \text { if } \frac{8t+4}{2}+1\le r\le \frac{9t+3}{2} ,\\ {[\omega ^2~1]}^T &{} \text { if } \frac{9t+3}{2}+1\le r\le \frac{10t+2}{2}. \\ \end{array}\right. }. \end{aligned}$$

Let C be an \([n,2]_4\) code generated by \(G=\begin{bmatrix} \beta _1&{}\beta _2&{}\cdots &{} \beta _n\\ \end{bmatrix}\). Then, \(S_{0\omega } = S_{10} = S_{\omega 0} = S_{\omega ^2 \omega ^2} = S_{\omega ^2 \omega } = S_{\omega \omega ^2} = \frac{t+1}{2}\), \(S_{01} = S_{11} = S_{1 \omega ^2} = S_{\omega ^21} = \frac{t-1}{2}\), and \(S_{ij}=0\) otherwise. It follows that:

$$\begin{aligned} \sum _{i \in {\mathbb {F}}_4^*} \sum _{j \in {\mathbb {F}}_4}S_{ij}&= 1,\\ \sum _{i \in {\mathbb {F}}_4} \sum _{j \in {\mathbb {F}}_4^*}S_{ij}&= 0,\\ y_{0} = S_{11} + S_{\omega \omega } + S_{\omega ^2\omega ^2}&= t,\\ y_{1} = S_{1\omega ^2} + S_{\omega 1} + S_{\omega ^2\omega }&= t, \text { and}\\ y_{2} = S_{\omega ^21} +S_{1\omega } + S_{\omega \omega ^2}&= t, \end{aligned}$$

which implies that:

$$\begin{aligned} G{G}^\dagger&= \begin{bmatrix} 1 &{} 0 \\ 0&{} 0 \end{bmatrix}, \end{aligned}$$

by (2.7). From Proposition 2.1, it can be concluded that C has Hermitian hull dimension \(2- \mathrm{rank}(GG^\dagger )=2-1=1\).

Using the definition of \(S_{ij}\) and (2.2)–(2.6), we have:

$$\begin{aligned} \text {wt}(\alpha _1) = \text {wt}(\omega \alpha _1) = \text {wt}(\omega ^2\alpha _1)&= 4t+1, \\ \text {wt}(\alpha _2) = \text {wt}(\omega \alpha _2) = \text {wt}(\omega ^2\alpha _2)&= 4t,\\ \text {wt}(\alpha _1 + \alpha _2) = \text {wt}(\omega \alpha _1 + \omega \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega ^2\alpha _2)&= 4t+1,\\ \text {wt}(\alpha _1 + \omega \alpha _2) = \text {wt}(\omega \alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega ^2\alpha _1 + \alpha _2)&= 4t+1, \text { and }\\ \text {wt}(\alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega \alpha _1 + \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega \alpha _2)&= 4t+1. \end{aligned}$$

Hence, C has minimum weight . Consequently, C is an optimal code with Hermitian hull dimension one.

From the two subcases, it follows that:

for all \(n \equiv 1 \ (\mathrm{mod}\ 5)\).

Case 2. \(n \equiv 2 \ (\mathrm{mod}\ 5)\). Then, \(n = 5t+2\) for some positive integer t. Since a quaternary linear code C is determined by the values \(S_{ij}\) for all \(i,j\in {\mathbb {F}}_4\), in the remaining parts, we give constructions of linear codes in terms of \(S_{ij}\). However, an explicit form of its generator matrix G can be determined in the same way as Case 1. We consider the following two subcases.

Case 2.1 t is even. Let \(S_{01} = S_{\omega 0} = S_{\omega ^2 \omega ^2} = S_{1\omega ^2} = S_{\omega ^2 \omega } = S_{\omega \omega ^2} = \frac{t}{2}, \ S_{0\omega } = \frac{t}{2} -1,\) \(S_{10} = S_{11} = S_{\omega ^21} = \frac{t}{2} +1, \text { and } S_{ij}=0\text { otherwise}.\) By (2.7), it can be concluded that:

$$\begin{aligned} \sum _{i \in {\mathbb {F}}_4^*} \sum _{j \in {\mathbb {F}}_4}S_{ij}&= 1,\\ \sum _{i \in {\mathbb {F}}_4} \sum _{j \in {\mathbb {F}}_4^*}S_{ij}&= 1,\\ y_{0} = S_{11} + S_{\omega \omega } + S_{\omega ^2\omega ^2}&= t+1,\\ y_{1} = S_{1\omega ^2} +S_{\omega 1} + S_{\omega ^2\omega }&= t, \text { and} \\ y_{2} = S_{\omega ^21} + S_{1\omega } + S_{\omega \omega ^2}&= t+1. \end{aligned}$$

Hence:

$$\begin{aligned} GG^\dagger&= \begin{bmatrix} 1 &{} \omega \\ \omega ^2&{} 1 \end{bmatrix}, \end{aligned}$$

which implies that \(\mathrm{rank}(GG^T) = 1\) and \(\dim (\text {Hull}_{\mathrm{H}}(C) )= 1\), by Proposition 2.1.

Based on the definition of \(S_{ij}\) and (2.2)–(2.6), it can be deduced that:

$$\begin{aligned} \text {wt}(\alpha _1) = \text {wt}(\omega \alpha _1) = \text {wt}(\omega ^2\alpha _1)&= 4t+3, \\ \text {wt}(\alpha _2) = \text {wt}(\omega \alpha _2) = \text {wt}(\omega ^2\alpha _2)&= 4t+1,\\ \text {wt}(\alpha _1 + \alpha _2) = \text {wt}(\omega \alpha _1 + \omega \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega ^2\alpha _2)&= 4t+1,\\ \text {wt}(\alpha _1 + \omega \alpha _2) = \text {wt}(\omega \alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega ^2\alpha _1 + \alpha _2)&= 4t+2, \text { and}\\ \text {wt}(\alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega \alpha _1 + \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega \alpha _2)&= 4t+1. \end{aligned}$$

Hence, the minimum weight of C is . As desired, C is an optimal code with Hermitian hull dimension one.

Case 2.2. t is odd. Let \(S_{10} = S_{11}=S_{\omega ^2\omega ^2} = S_{1\omega ^2} = S_{\omega ^2\omega } = S_{\omega ^21} = S_{\omega \omega ^2} = \frac{t+1}{2},\) \( S_{01} = S_{0\omega } = S_{\omega 0} = \frac{t-1}{2}, ~ \text { and } S_{ij}=0 \text { otherwise}.\) By (2.7), we have:

$$\begin{aligned} \sum _{i \in {\mathbb {F}}_4^*} \sum _{j \in {\mathbb {F}}_4}S_{ij}&= 1,\\ \sum _{i \in {\mathbb {F}}_4} \sum _{j \in {\mathbb {F}}_4^*}S_{ij}&= 0,\\ y_{0} = S_{11} + S_{\omega \omega } + S_{\omega ^2\omega ^2}&= t+1,\\ y_{1} = S_{1\omega ^2} + S_{\omega 1} + S_{\omega ^2\omega }&= t+1, \text { and }\\ y_{2} = S_{\omega ^21} +S_{1\omega } + S_{\omega \omega ^2}&= t+1, \end{aligned}$$

which implies that:

$$\begin{aligned} GG^\dagger&= \begin{bmatrix} 1 &{} 0 \\ 0&{} 0 \end{bmatrix}. \end{aligned}$$

In this case, \(\mathrm{rank}(GG^T) = 1\) and \(\dim (\text {Hull}_{\mathrm{H}}(C) )= 2- \mathrm{rank}(GG^T) =1\), by Proposition 2.1.

Using the definition of \(S_{ij}\) and (2.2)–(2.6), we have:

$$\begin{aligned} \text {wt}(\alpha _1) = \text {wt}(\omega \alpha _1) = \text {wt}(\omega ^2\alpha _1)&= 4t+3, \\ \text {wt}(\alpha _2) = \text {wt}(\omega \alpha _2) = \text {wt}(\omega ^2\alpha _2)&= 4t+2,\\ \text {wt}(\alpha _1 + \alpha _2) = \text {wt}(\omega \alpha _1 + \omega \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega ^2\alpha _2)&= 4t+1,\\ \text {wt}(\alpha _1 + \omega \alpha _2) = \text {wt}(\omega \alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega ^2\alpha _1 + \alpha _2)&= 4t+1, \text { and }\\ \text {wt}(\alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega \alpha _1 + \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega \alpha _2)&= 4t+1, \end{aligned}$$

which implies that C has minimum weight . In this case, C is an optimal code with Hermitian hull dimension one.

From the two subcases, it follows that:

for all \(n \equiv 2 \ (\mathrm{mod}\ 5)\).

Case 3. \(n \equiv 4 \ (\mathrm{mod}\ 5)\). Then, \(n = 5t+4\) for some positive integer t. We consider the following two cases based on the parity of t.

Case 3.1. t is even. Let \(S_{0\omega } = S_{10} = S_{\omega 0} = S_{\omega ^2\omega ^2} = S_{\omega \omega ^2} = S_{\omega ^2 \omega } = \frac{t}{2},\) \(S_{01} = S_{11} = S_{1\omega ^2} = S_{\omega ^21} = \frac{t}{2} + 1, \text { and } S_{ij}=0 \text { otherwise}.\) By (2.7), we have:

$$\begin{aligned} \sum _{i \in {\mathbb {F}}_4^*} \sum _{j \in {\mathbb {F}}_4}S_{ij}&= 1,\\ \sum _{i \in {\mathbb {F}}_4} \sum _{j \in {\mathbb {F}}_4^*}S_{ij}&= 0,\\ y_{0} = S_{11} + S_{\omega \omega } + S_{\omega ^2\omega ^2}&= t+1,\\ y_{1} = S_{1\omega ^2} + S_{\omega 1} + S_{\omega ^2\omega }&= t+1, \text { and }\\ y_{2} = S_{\omega ^21} +S_{1\omega } + S_{\omega \omega ^2}&= t+1, \end{aligned}$$

which implies that:

$$\begin{aligned} GG^\dagger&= \begin{bmatrix} 1 &{} 0 \\ 0&{} 0 \end{bmatrix}. \end{aligned}$$

It means that \(\mathrm{rank}(GG^T) = 1\) and C has Hermitian hull dimension one, by Proposition 2.1.

From the definition of \(S_{ij}\) and (2.2)–(2.6), it can be deduced that:

$$\begin{aligned} \text {wt}(\alpha _1) = \text {wt}(\omega \alpha _1) = \text {wt}(\omega ^2\alpha _1)&= 4t+3, \\ \text {wt}(\alpha _2) = \text {wt}(\omega \alpha _2) = \text {wt}(\omega ^2\alpha _2)&= 4t+4,\\ \text {wt}(\alpha _1 + \alpha _2) = \text {wt}(\omega \alpha _1 + \omega \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega ^2\alpha _2)&= 4t+3,\\ \text {wt}(\alpha _1 + \omega \alpha _2) = \text {wt}(\omega \alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega ^2\alpha _1 + \alpha _2)&= 4t+3, \text { and}\\ \text {wt}(\alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega \alpha _1 + \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega \alpha _2)&= 4t+3. \end{aligned}$$

Hence, C has minimum weight . Therefore, C is an optimal quaternary linear code with Hermitian hull dimension one.

Case 3.2. t is odd. Let \(S_{01} = S_{0\omega } = S_{\omega 0} = S_{11} = S_{\omega ^2\omega ^2} = S_{1\omega ^2} = S_{\omega ^2\omega } = S_{\omega ^21} = S_{\omega \omega ^2} = \frac{t+1}{2},\) \(S_{10} = \frac{t-1}{2}, \text { and } S_{ij}=0\text { otherwise}.\) By (2.7), it follows that:

$$\begin{aligned} \sum _{i \in {\mathbb {F}}_4^*} \sum _{j \in {\mathbb {F}}_4}S_{ij}&= 1,\\ \sum _{i \in {\mathbb {F}}_4} \sum _{j \in {\mathbb {F}}_4^*}S_{ij}&= 0,\\ y_{0} = S_{11} + S_{\omega \omega } + S_{\omega ^2\omega ^2}&= t+1,\\ y_{1} = S_{1\omega ^2} + S_{\omega 1} + S_{\omega ^2\omega }&= t+1, \text { and }\\ y_{2} = S_{\omega ^21} +S_{1\omega } + S_{\omega \omega ^2}&= t+1. \end{aligned}$$

Hence:

$$\begin{aligned} GG^\dagger&= \begin{bmatrix} 1 &{} 0 \\ 0&{} 0 \end{bmatrix}, \end{aligned}$$

which implies that \(\mathrm{rank}(GG^T) = 1\) and \(\dim (\text {Hull}_{\mathrm{H}}(C) )=2- \mathrm{rank}(GG^T) = 1\).

Applying the definition of \(S_{ij}\) and (2.2)–(2.6), we have:

$$\begin{aligned} \text {wt}(\alpha _1) = \text {wt}(\omega \alpha _1) = \text {wt}(\omega ^2\alpha _1)&= 4t+3, \\ \text {wt}(\alpha _2) = \text {wt}(\omega \alpha _2) = \text {wt}(\omega ^2\alpha _2)&= 4t+4,\\ \text {wt}(\alpha _1 + \alpha _2) = \text {wt}(\omega \alpha _1 + \omega \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega ^2\alpha _2)&= 4t+3,\\ \text {wt}(\alpha _1 + \omega \alpha _2) = \text {wt}(\omega \alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega ^2\alpha _1 + \alpha _2)&= 4t+3, \text { and}\\ \text {wt}(\alpha _1 + \omega ^2\alpha _2) = \text {wt}(\omega \alpha _1 + \alpha _2) = \text {wt}(\omega ^2\alpha _1 + \omega \alpha _2)&= 4t+3, \end{aligned}$$

which implies that . Consequently, C is an optimal code with Hermitian hull dimension one.

From the two subcases, it can be concluded that:

for all \(n \equiv 4 \ (\mathrm{mod}\ 5)\). \(\square \)

4 Bounds on \(D_4^{\mathrm{H}}(n,2, 1) \) with \(n \equiv 0,3 \ (\mathrm{mod}\ 5)\)

In this section, we focus on the two remaining cases where \(n \equiv 0,3 \ (\mathrm{mod}\ 5)\). For these cases, we provide good lower and upper bounds on the minimum weight of \([n,2]_4\) codes with Hermitian hull dimension one. Precisely, upper and lower bounds on \(D_4^{\mathrm{H}}(n,2, 1)\) are given with the gap one.

Theorem 4.1

Let n be a positive integer. If \(n \equiv 0,3 \ (\mathrm{mod}\ 5)\), then there exists an code with Hermitian hull dimension one.

Proof

Assume that \(n \equiv 0,3 \ (\mathrm{mod}\ 5)\). We consider the following two cases.

Case 1. \(n \equiv 0 \ (\mathrm{mod}\ 5)\). Then, \(n -1 \equiv 4 \ (\mathrm{mod}\ 5)\) and \(n = 5t\) for some positive integer t. By Theorem 3.1, there exists an code C with Hermitian hull dimension one. Let G be a generator matrix for C and let \(C'\) be a quaternary linear code generated by \(G'= \left[ {\varvec{0}} ~G \right] \). Since , it follows that \(C'\) is an code with Hermitian hull dimension one.

Case 2. \(n \equiv 3 \ (\mathrm{mod}\ 5)\). Then, \(n -1 \equiv 2 \ (\mathrm{mod}\ 5)\) and \(n = 5t+3\) for some positive integer t. By Theorem 3.1, there exists an code C with Hermitian hull dimension one. Let G be a generator matrix for C and let \(C'\) be a quaternary linear code generated by \(G'= \left[ {\varvec{0}} ~G \right] \). Since , it can be easily seen that \(C'\) is an code with Hermitian hull dimension one. \(\square \)

Corollary 4.2

Let n be a positive integer. If \(n \equiv 0 ,3 \ (\mathrm{mod}\ 5)\), then:

Proof

While the lower bound is given in Theorem  4.1, the upper bound is guaranteed by Lemma 2.3. \(\square \)

5 Conclusion and remarks

Constructions and bounds on quaternary linear codes with dimension two and Hermitian hull dimension one have been studied. Optimal quaternary \([n,2]_4\) codes with Hermitian hull dimension one have been constructed for all lengths \(n\ge 3\), such that \(n \equiv 1,2,4 \ (\mathrm{mod}\ 5)\). Good lower and upper bounds on the minimum weight of quaternary \([n,2]_4\) codes with Hermitian hull dimension one have been given for all lengths \(n \equiv 0,3 \ (\mathrm{mod}\ 5)\). The above results are summarized as follows.

Theorem 5.1

Let \(n\ge 3 \) be an integer. Then:

and

Based on our inspection, we propose the following conjecture.

Conjecture 5.2

for all positive integers \(n \equiv 0,3 \ (\mathrm{mod}\ 5)\).

In general, the study of lower and upper bounds on \(D_q^{\mathrm{H}}(n,k, \ell ) \) would be an interesting problem.