  Code distance is an important parameter for quantum stabilizer codes (QSCs).
Directly precisely computing it is an NP-complete problem. However, the upper
bound of code distance can be computed by some efficient methods. In this
paper, employing the idea of Monte Carlo method, we propose the algorithm of
determining the upper bound of code distance of QSCs based on fully decoupled
belief propagation. Our algorithm shows high precision - the upper bound of
code distance determined by the algorithm of a variety of QSCs whose code
distance is known is consistent with actual code distance. Besides, we explore
the upper bound of logical X operators of Z-type
Tanner-graph-recursive-expansion (Z-TGRE) code and Chamon code, which is a kind
of XYZ product code constructed by three repetition codes. The former is
consistent with the theoretical analysis, and the latter implies the code
distance of XYZ product codes can very likely achieve $O(N^{2/3})$, which
supports the conjecture of Leverrier et al..
