for i,j = r +1 , · · · , n are different. Choosing a set of matrices A , B , C such that C $^{T}$+ AB $^{T}$+ C + BA T = O determines a unitary operator W by the encoding circuit algorithm, which determines a set of symplectic partners of g ′ $_{1}$, · · · ,g ′ r and a different set of logical operators. Thus we call W the selection operator for EAQEC codes. The minimum distance of the EAQEC code can be optimized by examining each distinct encoding operator U$_{E}$W . Note that the simplified logical matrix is not affected by the matrix C . Therefore, there are 2 2 rk distinct sets of logical operators. Lemma 1. Given matrices A and B , then the matrix C , satisfying (18), is of the form where M is a symmetric matrix. Proof. Suppose C ′ = BA T + M + M ′ , where M ′ is not a symmetric matrix, satisfies (18). Then which implies that M ′ is the zero matrix. C = BA T + M, O = AB T + BA T + C ′ + ( C ′ ) T = M ′ + ( M ′ ) $^{T}$, We construct an EAQEC code that achieves the quantum singleton bound by applying this procedure to a standard quantum stabilizer code in the following example. Example 1. A check matrix of the standard [[5 , 1 , 1]] 5-qubit bit flip code is     00000 11000 00000 01100 00000 00110 00000 00011    $^{.}$ 16