-
Notifications
You must be signed in to change notification settings - Fork 52
Lanczos method #315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Lanczos method #315
Conversation
…ocessing to construct H and S DxD matrices
…create the lanczos_alg function executing the subroutine, returning the ground state energy
…ring circuit) and lanczos_expvals (obtaining the expectation values). Included distinctions for jasp vs non-jasp using check_for_tracing_mode. Tk_expvals are now arrays and not dictionaries anymore.
… and JAX-traceable function for building S and H from Tk
…ional; added documentation for lanczos_expvals
…unction that returns the operand
…g generalized eigenvalue problem is not implemented
|
Auxiliary methods (inner_lanczos, lanczos_expvals) are Jasp compatible and jax versions of classical post processing functions are implemented. However, solving the generalized eigenvalue problems seems to be not implemented for the corresponding jax.numpy/jax.scipy functions (at least for version 0.6). Hence, executing full Lanczos method in Jasp is currently not supported. Update: Lanczos implementation is now fully Jasp compatible using a custom implementation for solving the generalized eigenvalue problem |
| ($|\gamma_0|=\Omega(1/\text{poly}(n))$ for $n$ qubits) with the true ground state. The Chebyshev approach allows exact | ||
| Krylov space construction (up to sample noise) without real or imaginary time evolution. | ||
|
|
||
| This algorithm is motivated by the rapid convergence of the Lanczos method for estimating extremal eigenvalues, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also mention the numerical instability of the generalized eigenvalue problem, and the importance of regularization (a wrong result for the energy could be returned depending on the cutoff).
|
|
||
| This function implements the Lanczos method on a quantum computer using block-encodings of Chebyshev | ||
| polynomials $T_k(H)$, closely following the algorithm proposed in | ||
| `"Exact and efficient Lanczos method on a quantum computer" <https://quantum-journal.org/papers/q-2023-05-23-1018/>`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should could add some formulas for derivation of the generalized eigenvalue problem form expectation values <T_k(H)>.
…ed JAX implementation for regularization of H, S matrices; Lanczos algorithm is now Jasp compatible
|
In principle, we could always use the jitted versions of the post processing functions, i.e., remove the |
This pull request add a complete implementation of Exact and efficient Lanczos method on a quantum computer for ground state energy estimation.
The quantum Lanczos method efficiently constructs a Krylov subspace by applying Chebyshev polynomials of the Hamiltonian to an initial state. It avoids the classical barrier of exponential cost in representing Krylov vectors.
Implements the following steps:$\langle T_k(H)\rangle$ .$(\mathbf{S}, \mathbf{H})$ .$\mathbf{S}$ and $\mathbf{H}$ by projecting onto the subspace with well conditioned eigenvalues.$\mathbf{H}\vec{v}=\epsilon\mathbf{S}\vec{v}$ . Returns lowest eigenvalue $\epsilon_{\text{min}}$ as ground state energy estimate.
1.
inner_lanczos: construct the circuit2.
lanczos_expvals: runs quantum Lanczos subroutine to obtain Chebyshev expectation values3.
build_S_H_from_Tk: builds overlap and Hamiltonian subspace matrices4.
regularize_S_H: regularizes overlap matrix5.
lanczos_alg: utilizes all of the above to solve the generalized eigenvalue problemTo-do: