Back to News
quantum-computing

QFT of two superposed states

user12910
Loading...
4 min read
0 likes
⚡ Quantum Brief
A quantum computing researcher sought a quantum Fourier transform (QFT) method to compute sums or differences of two superposed states, like extracting 20 and -6 from |7⟩ + |13⟩, but standard QFT fails for this task. The proposed operation is non-unitary and mathematically ill-defined, as swapping |a⟩ and |b⟩ yields inconsistent outputs, violating quantum mechanics’ linearity requirements for valid transformations. Classical discrete Fourier transforms (DFT) handle vector entries directly, but quantum states encode values as basis positions (e.g., |7⟩), not amplitudes, making QFT inapplicable for arithmetic on these encoded numbers. Experts clarified that QFT manipulates phase relationships, not basis state labels, so it cannot perform arithmetic like addition/subtraction on computational basis states without additional classical post-processing. Alternative approaches, such as encoding values in amplitudes (e.g., a|0⟩ + b|1⟩) and applying Hadamard gates, were suggested but deemed impractical for the researcher’s goal of register-based arithmetic.
AI Audio Summary
0:00 / 0:00
Click to play
Quantum computing technology
Unsplash · Validated Fallback

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work. Bring the best of human thought and AI automation together at your work. Learn more TeamsQ&A for workConnect and share knowledge within a single location that is structured and easy to search.Given a N qubits quantum register, in state $1/\sqrt{2}(|a\rangle+|b\rangle)$, my goal is to find sum of a and b (a+b) or subtraction (b-a).Taking classical example, let [7, 13], the discret FT will give [20, -6], that is what I'd like to obtain. The traditionnal QFT does not give this result. It's quantum counterpart could be a 4 qubits quantum register in state $1/\sqrt{2}(|7\rangle+|13\rangle)$, by applying the desired unitary I would get state $1/\sqrt{2}(|20\rangle+|6\rangle)$How could I do to get the desired result ?Thank you.This is not a unitary transformation. Note for instance note taking $b=|0\rangle$ yields $\sqrt{2}|a\rangle$ which isn't a normalized state.It probably comes from the fact that this operation isn't well-defined. Indeed, let's call $F$ this operation. We have $$F\left(\frac{|a\rangle+|b\rangle}{\sqrt{2}}\right)=\frac{|a+b\rangle+|a-b\rangle}{\sqrt{2}}$$ but we also have $$F\left(\frac{|b\rangle+|a\rangle}{\sqrt{2}}\right)=\frac{|a+b\rangle+|b-a\rangle}{\sqrt{2}}\,.$$ Thus, with the definition of $F$, we can get two different images for the same input vector.You cannot use the QFT to achieve what you are trying to accomplish.First off, the reason you get the following result for the Discrete Fourier Transform (DFT) for a two input vector:$$F_2 \begin{bmatrix}a \\ b \end{bmatrix} = \begin{bmatrix}a + b\\ a - b \end{bmatrix} $$is because the two-entry matrix for the DFT is basically the matrix:$$ F_2 = \begin{bmatrix} 1 & \phantom{-}1 \\ 1 & -1 \end{bmatrix} $$On the other hand, for the quantum case you're presenting, you start with an equal superposition state:$$ \frac{1}{\sqrt{2}} \left(|a\rangle + |b\rangle \right), $$but here $a, b$ are not the entries of the state vector. Instead, they represent two arbitrary computational basis states. Take for instance the example you presented with $a = 7$ and $b = 13.$ This gives you the quantum state:$$ \frac{1}{\sqrt{2}} \left(|0111\rangle + |1101\rangle \right). $$Now, notice that the column vector representation for this state is:$$ \begin{bmatrix}0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\sqrt{2}} & 0 & 0 & 0 & 0 & 0 & \frac{1}{\sqrt{2}} & 0 & 0\end{bmatrix}^\top .$$for which the numbers $7$ and $13$ are nowhere to be found. These two numbers represent the positions where the probability amplitudes are $1/\sqrt{2}$, but they are not the amplitudes themselves. Therefore, the QFT will not perform any type of operation on the numbers you want to add/subtract. Furthermore, the QFT matrix acting on such state will not result in addition/subtraction of the amplitudes, but rather in phase variations that depend on the size of the matrix and the non-zero coefficients of your vector.If you want to perform a similar operation to what you are doing classically, you will have to encode $7$ and $13$ in the probability amplitudes of the superposition state $a|0\rangle + b|1\rangle$ (where $a$ and $b$ would have to be normalized), and apply a Hadamard matrix (and of course keep track of changes associated with normalization). In any case, I don't think this is what you're looking for since you want to add/subtract values encoded in a register.Thanks for contributing an answer to Quantum Computing Stack Exchange!But avoid …Use MathJax to format equations. MathJax reference.To learn more, see our tips on writing great answers.Required, but never shown By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy. Start asking to get answersFind the answer to your question by asking.Explore related questionsSee similar questions with these tags.To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Site design / logo © 2025 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2025.11.20.37056

Read Original

Source Information

Source: Quantum Computing Stack Exchange

Discussion

0 professional contributions

Sign in to join this professional discussion.

Be the first to add a constructive contribution.