The important part of quantum information science is quantum error-correction and quantum computation. In thepractical application, some methods of quantum communication, such as the quantum communication based on the atmosphere transmission, require a mix ofmathematics-potentially to solve the problem. The quantum error-correction code is an efficient method to calculate quantum communication. However,since the construction of quantum error-correction codes depends on the degree of quantum entanglement, it is difficult to be widely used in practice.At present, the graph state is a promising solution to reduce the degree of codewords entanglement. But there are still many difficulties in constructingthe high-dimensional graph state. More importantly, the above difficulties can be skillfully solved by the upper and lower bounds of codewords entanglement.Based on the characteristics of the cyclic difference set of stabilizer codes and the combination of U and B of classical low-density parity check (LDPC) codes,a high-dimensional quantum low-density parity check (QLDPC) code is constructed creatively. By calculating the characteristics of the non-$Z$-type generators ofthe new codewords, the minimum number is obtained and the entanglement upper bound of the new code is acquired. And then, the rank of the check matrix of thenew code is calculated as the lower bound of entanglement. When the upper bound and lower bound of entanglement are different, the learning vectorquantization (LVQ) algorithm in machine learning can be used to simultaneously obtain the codewords entanglement and the coding complexity of the code,in which the relationship between them can be derived. In terms of calculating the running speed, compared with the iterative algorithm in the Lagrange multipliermethod, the running speed of LVQ algorithm is increased by $37.68%$. In this paper, a measurement of quantum codewords entanglement is proposed, which supports a helpful role in thedesign of quantum error-correction codes with higher decoding efficiency.