Suppose we have an $n$-qubit system. Let $Y_i$ and $Z_j$ denote the Pauli-Y and Pauli-Z operators acting on the $i$th and $j$th qubits, respectively.

Suppose we have a finite set of tuples $E = \{(i,j)\}_{i\neq j}$. We can think of $E$ being an edge set of an undirected graph $G$ that has no loops and no double edges.

My question is, how do I formally argue that the following is true: $$\sum_{(i,j) \in E} Y_i Z_j \neq 0,$$ where $Y_iZ_j$ is the usual matrix product of $Y_i$ and $Z_j$.

  • $\begingroup$ Do you mean the identity operation instead of the zero matrix as the right hand side of your equation? Any operators acting on qubits must be unitary matrices, so the zero matrix is not a possible operation, and thus cannot be the result of any gate sequence. $\endgroup$
    – jchadwick
    Aug 10, 2022 at 20:45
  • $\begingroup$ I want to argue that the sum does not cancel to zero. What you say is not true in general because if we had a Hamiltonian $X - X$, then it is zero; however, $X$ is unitary. Clearly, the sum is not a gate but a Hamiltonian. $\endgroup$
    – MonteNero
    Aug 10, 2022 at 21:05
  • $\begingroup$ Is $Y_iZ_j = Y_i \otimes Z_j$? $\endgroup$
    – Ohad
    Aug 10, 2022 at 21:32
  • $\begingroup$ @Ohad I've added a clarification to the question. $\endgroup$
    – MonteNero
    Aug 10, 2022 at 21:42

2 Answers 2


The set of $n$-qubit Pauli matrices $\{P_i\}_{i=1,\dots,4^n}$ forms a (orthogonal) basis for the vector space of complex matrices.

In particular, the set of Pauli matrices is linearly independent. Hence, the equation $$ \sum_{i=1}^{4^n} x_i P_i = 0, $$ does only have a trivial solution $x_i=0$. This implies that the sum over any subset cannot be the zero matrix (this would correspond to a solution where at least one $x_i =1$).

Definition: A $n$-qubit Pauli matrix $P$ is any tensor product $$ P = \sigma_1\otimes\dots\otimes\sigma_n, $$ where $\sigma_j \in \{ \mathrm I, X, Y, Z\}$.

Orthogonality: Note that $X,Y,Z$ are traceless. Moreover, we have $\sigma^2 = I$ for any $\sigma\in \{ \mathrm I, X, Y, Z\}$ and the product $\sigma\sigma'$ is, up to a phase, either $X$, $Y$, or $Z$ if $\sigma,\sigma'\in \{ \mathrm I, X, Y, Z\}$ and $\sigma\neq\sigma'$. Hence $$ \mathrm{tr}( \sigma\sigma' ) = \begin{cases} 2 & \text{if } \sigma=\sigma' \\ 0 & \text{else} \end{cases}. $$ Hence, the 1-qubit Pauli matrices are orthogonal w.r.t. the Hilbert-Schmidt (trace) inner product. This readily generalizes to the $n$-qubit cases which shows that the $4^n$ Pauli matrices form an orthogonal basis for the $4^n$-dimensional vector space of complex matrices $\mathbb{C}^{2^n \times 2^n}$.

  • $\begingroup$ Thank you for the answer! What are exactly $P_i$ here and what do you exactly mean by "the set of $n$-qubit Pauli matrices"? $\endgroup$
    – MonteNero
    Aug 11, 2022 at 8:09
  • $\begingroup$ @MonteNero I extended my answer. $\endgroup$ Aug 11, 2022 at 11:46

I realized that this can be checked rather easily. We compute $$\left( \sum_{(i,j) \in E} Y_i Z_j \right) |0\rangle^{\otimes n}$$ and see that it is the sum of a subset of standard basis vectors: $$\left( \sum_{(i,j) \in E} Y_i Z_j \right) |0\rangle^{\otimes n} = \sum_{(i,j) \in E} \mathbb{i} \bigotimes_{k=1}^n |\delta_{k,i}\rangle \neq 0,$$ where $\delta_{k,i} = 1$ for $k=i$ and $\delta_{k,i}=0$ for $k \neq i$. The expression $\bigotimes_{k=1}^n |\delta_{k,i}\rangle$ is a ket of a binary string whose entries are all zero except the $i$th entry.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.