qrisp.cks.cheb_coefficients#
- cheb_coefficients(j0, b)[source]#
Calculates the positive coefficients \(\alpha_i\) for the truncated Chebyshev expansion of \(1/x\) up to order \(2j_0+1\), as described in the Childs–Kothari–Somma paper.
The approximation is expressed as a linear combination of odd Chebyshev polynomials truncated at index \(j_0\) (Lemma 14):
\[g(x) = 4 \sum_{j=0}^{j_0} (-1)^j \left[ \sum_{i=j+1}^{b} \frac{\binom{2b}{b+i}}{2^{2b}} \right] T_{2j+1}(x)\]The Linear Combination of Unitaries (LCU) lemma requires strictly positive coefficients \(\alpha_i > 0\), their absolute values are used. The alternating factor \((-1)^j\) is later implemented as a set of Z-gates within the CKS circuit (see
inner_CKS()).- Parameters:
- j0int
Truncation order of the Chebyshev expansion, \(j_0 = \lfloor\sqrt{\beta \log(4\beta/\epsilon)}\rfloor\).
- bfloat
Complexity parameter, \(\beta = \lfloor\kappa^2 \log(\kappa/\epsilon)\rfloor\).
- Returns:
- coeffsnumpy.ndarray
Array of positive Chebyshev coefficients \({\alpha_{2j+1}}\), corresponding to the odd degrees of Chebyshev polynomials of the first kind \(T_1, T_3, \dots, T_{2j_0+1}\).