Binary inner-products with XOR operation

analytic-combinatoricsbinary operationscombinationscombinatoricsnumerical linear algebra

Consider the binary power set $\{\underline{K}\}$ which contains binary strings of length $N$. Example for $N=3$ we have $$\big\{\underline{K}\big\} = \big\{\{000\},\{100\},\{010\},\{001\},\{110\},\{101\},\{011\},\{111\} \big\}.$$ If we now consider two vector states defined by the linear combinations of the tensor product of these two-level basis vector states $$|\psi \rangle := \sum_{\{ \underline{K} \}}a_i|k_1\cdot \cdot \cdot k_N \rangle ~~~\text{and}~~~ |\phi \rangle := \sum_{\{ \underline{K} \}}b_j|(k_1\oplus 1) k_2\cdot \cdot \cdot k_N \rangle,$$ where $a_i$ and $b_j$ are real or complex coefficients and $\oplus$ is the XOR binary operation acting on the first entry of the second vector $| \phi \rangle$ (hence maps $|0\rangle \mapsto |1\rangle$ and $|1\rangle \mapsto |0\rangle$). Is there maybe some formula or pattern that gives the value of the inner-product $$\langle \psi | \phi \rangle$$ if we consider the general $N$-length binary power set. For the $N=3$ case we get $\langle \psi | \phi \rangle = a_1b_2 + a_2b_1 + a_3b_5 + a_4b_6 + a_5b_3 +a_6b_4 + a_7b_8 + a_8b_7$.

Thanks for any assistance.

Best Answer

Order the elements $K$ by their correspondent number in base 10, for example, instead of your ordering, consider $$000,100,010,110,001,101,011,111.$$ in this way the $i-$th element corresponds to base 2 decomposition of $i$ (starting at 0), This way, for $N=3$ you get $\langle \psi |\phi \rangle =a_0b_1+a_1b_0+a_2b_3+a_3b_2+a_4b_5+a_5b_4+a_6b_7+a_7b_6.$

That way, in general you get $$\langle \psi |\phi \rangle =\sum _{i=0}^{2^{N-1}-1}a_{2n}b_{2n+1}+\sum _{i=0}^{2^{N-1}-1}a_{2n+1}b_{2n}.$$

Related Question