Table 2: Closed forms of N ( r, c ) for different c c N ( r, c ) 0 or r 1 1 or r − 1 2 r − 1 2 or r 2 2 $_{3}$4 $^{r}$− 1 − 2 $^{r}$− 1 + 1 3 3 or r − 3 1 $_{21}$8 $^{r}$− 1 − 2 $_{3}$4 $^{r}$− 2 + 1 $_{3}$2 $^{r}$− 2 − 1 21 4 or r 4 4 $_{315}$16 $^{r}$− 2 − 1 $_{21}$8 $^{r}$− 2 + 2 $_{9}$4 $^{r}$− 3 − 1 $_{21}$2 $^{r}$− 3 + 1 315 5 or r − 5 1 $_{9765}$32 $^{r}$− 2 − 4 $_{315}$16 $^{r}$− 3 + 1 $_{63}$8 $^{r}$− 3 − 2 $_{63}$4 $^{r}$− 4 + 1 $_{315}$2 $^{r}$− 4 − 1 9765 6 or r 6 8 $_{615195}$64 $^{r}$− 3 − 1 $_{9765}$32 $^{r}$− 3 + 4 $_{945}$16 $^{r}$− 4 − 1 $_{441}$8 $^{r}$− 4 + 1 $_{945}$4 $^{r}$− 5 − 1 $_{9765}$2 $^{r}$− 5 + 1 615195 C = BA T + M , determines a series of type 2 unitary row operators. Actually, unitary row operators of type 2 do not affect the set N ( S ′ ) − S ′ I or the error-correcting ability, and the symmetric matrix M can be eliminated. If a set T = { t$_{1}$, · · · , t$_{c}$ } of c < r ancilla qubits are replaced by ebits, it can be verified that N ( S ′ ) = 〈 g$_{j}$ : j / ∈ T, ¯ Z$_{1}$, · · · , ¯ Z$_{k}$, ¯ Z$_{1}$, · · · , ¯ Z$_{k}$ 〉 remains unchanged under the operation of type 3 and type 4 unitary row operators on the h ′ j for j / ∈ T . It suffices to assume that the operation W consists of type 3 and type 4 unitary row operators that operate only on the h ′ j for j ∈ T . To sum up, we have the following theorem. Theorem 5. The operation of W is equivalent to applying a series of type 4 unitary row operators, followed by a series of type 3 unitary row operators, on the h ′ j for j ∈ T . In addition, there are 2 2 ck distinct selection operators with Combining the effects of the unitary row operation V with the selection operator W in the previous section, we can optimize an encoding operation of the form U = V U$_{E}$W over possibilities. We call this the encoding optimization procedure for EAQEC codes. Note that we can find another unitary row operator W ′ corresponding to W such that W ′ U$_{E}$ and U$_{E}$W 26 2 2 $^{ck}$N ( r, c ) C = BA $^{T}$.