Self-orthogonal codes have nice applications in many areas including quantum codes, lattices and LCD codes. For a prime powerq, it is in general difficult to constructq-ary self-orthogonal codes. In the literature, there exists no simple method to judge whether a generalq-ary linear code is self-orthogonal or not. In this paper, we mainly present several families ofq-ary self-orthogonal codes and study their applications in quantum codes and LCD codes. Firstly, several families ofq-ary linear codes are constructed by some special defining sets. These codes are proved to be self-orthogonal. To this end, we determine the numbers of solutions of some systems of equations over finite fields. Secondly, three families ofq-ary quantum codes with unbounded length and minimum distance three are constructed from the self-orthogonal codes. These quantum codes are optimal according to the quantum Hamming bound. In particular, some of them have better parameters than known ones. Thirdly, several families ofq-ary LCD codes are constructed from the self-orthogonal codes. Many optimal or almost optimal binary and ternary LCD codes are produced by our constructions. Some binary and ternary LCD codes have better parameters than known ones.
We prove that any Hermitian self-orthogonal
[n,k,d]q2 code gives rise to an
[n,k,d]q2 code with
ℓ dimensional Hermitian hull for
0≤ℓ≤k. We present a new method to construct Hermitian self-orthogonal
[n,k]q2 codes with large dimensions
k>q+1n+q−1. New families of Hermitian self-orthogonal codes with good parameters are obtained; more precisely those containing almost MDS codes. By applying a puncturing technique to Hermitian self-orthogonal codes, MDS
[n,k]q2 linear codes with Hermitian hull having large dimensions
k>q+1n+q−1 are also derived. New families of MDS, almost MDS and optimal codes with arbitrary Hermitian hull dimensions are explicitly constructed from algebraic curves. As an application, we provide entanglement-assisted quantum error correcting codes with new parameters.