  In this paper, we investigate the optimal nonadditive quantum error-detecting
codes with distance two. The the numerical simulation shows that, with n being
can be 5, 6, 7, 8, 10 and 12, such the n-qubit quantum error-detecting codes
with maximal number of codewords can be found. Therein, except the n=7 case,
the n-vertex loop graphs help find the optimal quantum codes.
