In this paper, based on the nonbinary graph state, we present a systematic
way of constructing good non-binary quantum codes, both additive and
nonadditive, for systems with integer dimensions. With the help of computer
search, which results in many interesting codes including some nonadditive
codes meeting the Singleton bounds, we are able to construct explicitly four
families of optimal codes, namely, [[6,2,3]]p, [[7,3,3]]p, [[8,2,4]]p
and [[8,4,3]]p for any odd dimension p and a family of nonadditive code
((5,p,3))p for arbitrary p>3. In the case of composite numbers as
dimensions, we also construct a family of stabilizer codes ((6,2⋅p2,3))2p for odd p, whose coding subspace is {\em not} of a dimension
that is a power of the dimension of the physical subsystem.Comment: 12 pages, 5 figures (pdf