文摘
Linear codes with few weights have applications in secrete sharing, authentication codes, association schemes, and strongly regular graphs. In this paper, a construction of q-ary linear codes with few weights employing general quadratic forms over the finite field \({\mathbb {F}}_{q}\) is proposed, where q is an odd prime power. This generalizes some earlier constructions of p-ary linear codes from quadratic bent functions over the prime field \({\mathbb {F}}_{p}\), where p is an odd prime. The complete weight enumerators of the resultant q-ary linear codes are also determined.