1
$\begingroup$

I'm a beginner and I'm working on a question where I need to do a quantum fourier transformation on an input string that consists of "-1"s and "1"s. In Qiskit's documentation on QFTs, I saw that NOT gates are used for binary 1s and the absence of NOT gates represent binary 0s. But how can I represent a -1?

$\endgroup$
0

1 Answer 1

2
$\begingroup$

QFT performs a discrete Fourier Transform on the amplitudes of the state vector, not the bit strings. Therefore, you should be putting $-1$ (with appropriate normalization) in the amplitudes of the vector. You can achieve this using a $Z$ gate. For example if you have:

$$Z\,H\,\vert 0\rangle= Z\, \frac{1}{\sqrt{2}}(\vert 0\rangle +\vert 1 \rangle)= \frac{1}{\sqrt{2}}(\vert 0\rangle -\vert 1 \rangle)$$

Performing a QFT on the above state is equivalent to performing a discrete Fourier Transform on $\lbrace \frac{1}{\sqrt{2}}, \frac{-1}{\sqrt{2}}\rbrace$ which results in $\lbrace 0, 1\rbrace$ which as a state vector would correspond to $\vert 1\rangle$.

As a side note, given that the QFT in the case of a single qubit is just $H$, we get the following identity:

$$H\, Z\, H = X$$

$\endgroup$

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.