Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • $\begingroup$ Just to be sure, $n$ is necessarily a power of $2$ here, since you're talking about qubits? $\endgroup$ Commented Oct 23, 2024 at 7:36
  • 1
    $\begingroup$ There's a solution with $\mathcal{O}(n\times\mathrm{polylog}(n))$ gates, but I'm unsure whether it's possible to do better, since it doesn't seem to be a "nice" structure $\endgroup$ Commented Oct 23, 2024 at 10:43
  • $\begingroup$ To answer your question, $n^2=2^Q$ where Q is the number of qubits. So yes, it is a power of $2$ and $Q$ must be even. Would you mind sharing your $\mathcal{O}(n\times \text{polylog}(n)))$ solution? $\endgroup$ Commented Oct 23, 2024 at 14:18
  • $\begingroup$ I've added the answer. If it doesn't fit your problem, tell me and I'll delete it! $\endgroup$ Commented Oct 23, 2024 at 15:09