qrisp.lanczos.lanczos_even#

lanczos_even(BE: BlockEncoding, k: int, operand_prep: Callable[[...], Any]) Tuple[QuantumVariable, ...][source]#

This function implements the Krylov space construction via block-encodings of Chebyshev polynomials \(T_k(H)\), following the layout in Figure 1(a) of Kirby et al..

For even \(k\), the subroutine prepares a state by applying \(k/2\) qubitization steps \((RU)\). The expectation value \(\langle T_k(H)\rangle_0\) is then obtained by measuring the reflection operator \(R = 2|0\rangle_a\langle 0|_a - I\) on the ancillas.

The “all-zeros” measurement outcome (representing \(|0\rangle_a\)) corresponds to the \(+1\) eigenvalue of \(R\), while any other outcome corresponds to \(-1\).

Parameters:
BEBlockEncoding

The block-encoding of the Hamiltonian \(H\) for which we want to estimate the ground-state energy.

kint

Even integer representing the even Chebyshev polynomial order.

operand_prepCallable

Function returning the (operand) QuantumVariables in the initial system state \(\ket{\psi_0}\), i.e., operands=operand_prep(). Must return a QuantumVariable or a tuple of QuantumVariables.

Returns:
tuple of QuantumVariable

The ancilla QuantumVariables. Measurement outcomes of these variables encode the expectation value.