qrisp.lanczos.lanczos_odd#

lanczos_odd(BE: BlockEncoding, k: int, operand_prep: Callable[[...], Any]) QuantumBool[source]#

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

For odd \(k\), the subroutine applies \(\lfloor k/2 \rfloor\) qubitization steps followed by a Hadamard test for the block-encoding unitary \(U\). This effectively estimates \(\langle \psi_{\lfloor k/2 \rfloor} | U | \psi_{\lfloor k/2 \rfloor} \rangle\), which encodes the odd Chebyshev expectation value \(\langle T_k(H)\rangle_0\).

Parameters:
BEBlockEncoding

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

kint

Odd integer representing the odd 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:
QuantumBool

QuantumBool used as the Hadamard test ancilla. The expectation value is derived from the Z-basis measurement statistics (\(P(0) - P(1)\)).