TransWikia.com

What is the output of applying the Hadamard matrix to $sum_{yin{0,1}^n} (-1)^{xy}|yrangle$?

Quantum Computing Asked on January 16, 2021

If, for some $x$, I have the $n$-qubit state
$$sum_{yin{0,1}^n} (-1)^{xy}|yrangle,$$
and I would like to apply to that the $n$-qubit Hadamard transform, with the aim of calculating the final state.

I understand I can continue like following:
$$sum_{yin{0,1}^n}sum_{jin{0,1}^n}(-1)^{xy}(-1)^{jy} |jrangle
= sum_{yin{0,1}^n}sum_{jin{0,1}^n}(-1)^{y(x+j)}|jrangle, $$

but what cancels out here and why?

One Answer

Use the identity $$ sum_{yin{0,1}^n} (-1)^{ycdot z} = 2^n delta_{z,0} $$ with $z=x+j$. This identity is based on the fact that "summing $d$-th roots of unity gives zero" if $d>1$.

Then you see that the result of applying the Hadamard gate twice is indeed the input state: $$ sum_{yin{0,1}^n} sum_{jin{0,1}^n} (-1)^{ycdot (x+j)} |jrangle = 2^n |xrangle $$ Note that usually the Hadamard gate is normalised by $2^{-n/2}$ for it to be unitary.

Remark: In higher-dimensional systems, $Hneq H^{-1}$, which you can see above since the identity would give you $j=-x$ which is only equal to $x$ in $mathbb{Z}_2={0,1}$. There, the inverse has an additional minus sign in the exponent (well, and replace $-1$ by $e^{2pi i/d}$).

EDIT: I was asked to elaborate on the sum of roots of unity. Let's show the following $$ sum_{yinmathbb{Z}_d^n} omega^{ycdot z} = d^n delta_{z,0}, $$ where $d>1$ and $omega$ is primitive $d$-th root of unity, e.g. $omega=e^{2pi i/d}$. Above, we have $d=2$. We have the following identity for the sum of all primitive $d$-th roots: $$ sum_{k=0}^{d-1} omega^k = 0. $$ I will not give a proof of this. It should be clear from the geometrical intuition, just think about the equidistant position of the roots of unity on the unit circle (cp. Wiki). Next, we have to count how many times we get each root of unity in the second-to-last equation. If $zneq 0$, there are $d^{n-1}$ possible solutions $yinmathbb{Z}_d^n$ to each of the linear systems $ycdot z = k$ for $kinmathbb{Z}_d$. Clearly, the solution spaces are mutally disjoint and their union is $mathbb{Z}_d^n$. Thus, any primitive root appears exactly $d^{n-1}$ times, and the sum is $d^{n-1} sum_{k=0}^{d-1} omega^k = 0$. If $z=0$, however, any term is identically $1$ and the result is $d^n$.

PS: BTW, the matrix representation of the Hadamard gate is just the discrete Fourier transform; the math is the same.

Correct answer by Markus Heinrich on January 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP