quantumlib / Qualtran

Qᴜᴀʟᴛʀᴀɴ is a Python library for expressing and analyzing Fault Tolerant Quantum algorithms.
https://qualtran.readthedocs.io/en/latest/
Apache License 2.0
173 stars 40 forks source link

Add FFT QSP #1078

Closed Epsilon1024 closed 2 months ago

Epsilon1024 commented 3 months ago

Added fft_qsp module to address Issue 1076

This fixes the error issues found by fast_complementary_polynomial by using the algorithm described in Berntson and Sunderhauf (2024) (Algorithm 2 based off the code in Figure 1). This method takes the target precision as an input parameter and automatically determines the number of FFT modes needed to guarantee the given precision.

tanujkhattar commented 3 months ago

cc @christoph-riverlane for visibility, who is one of the authors of the linked paper.

Epsilon1024 commented 3 months ago

I just noticed that N must be even (corollary 2.2). Let me fix that real quick.

anurudhp commented 3 months ago

@Epsilon1024 could you rebase on main and squash all the commits so far? there's a lot of legacy commits, it's hard to keep track of new changes to review.

tanujkhattar commented 3 months ago

@anurudhp You can just go to files changed and it shows only two new files?

image
anurudhp commented 3 months ago

Right that's true. I meant more for reviewing incremental changes, but I guess I can just look from the last two commits, so no issue.

christoph-riverlane commented 3 months ago

Hi all, thanks Tanuj for tagging me, and thanks for the interest in our algorithm and paper. Two notes:

Cheers, Christoph