Skip to content
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

Why do we still use Lanczos for c ≠ integer? #114

Open
dlfivefifty opened this issue Jul 24, 2024 · 7 comments
Open

Why do we still use Lanczos for c ≠ integer? #114

dlfivefifty opened this issue Jul 24, 2024 · 7 comments

Comments

@dlfivefifty
Copy link
Member

Cholesky should always be faster. otherwise we've done something seriously wrong!

@TSGut @ioannisPApapadopoulos @DanielVandH

@ioannisPApapadopoulos
Copy link
Member

I do not think we do. Looking at

function semiclassical_jacobimatrix(t, a, b, c)
it seems it only uses Lanczos if c is not an integer?

@dlfivefifty dlfivefifty changed the title Why do we still use Lanczos for c ≠ 0? Why do we still use Lanczos for c ≠ integer? Jul 24, 2024
@dlfivefifty
Copy link
Member Author

That's what I meant

@TSGut
Copy link
Member

TSGut commented Jul 24, 2024

It's just a matter of a more subtle implementation. I guess we'd want to go to the integer floor of the given parameters via a hierarchy, then go the final non integer amount as a last step. It should be fine to do that, though it won't be a polynomial modification at the end, so it won't be a banded connection. Not that big of an issue though.

The answer to your question is just that it's a bit more subtle and we didn't need it. But I can get that working pretty quickly if we do.

@dlfivefifty
Copy link
Member Author

you just approximate (t-x)^c by a polynomial

@TSGut
Copy link
Member

TSGut commented Jul 24, 2024

Well, as long as what you mean is to reach $P^{a,b,c}(x)$ with $c$ a general real, we ladder to $P^{a,b,\lfloor c \rfloor}(x)$ as now and then from there use decomposition methods on the Clenshaw-computed remaining weight $(tI-X)^{c-\lfloor c \rfloor}$. Otherwise it will be unstable for high $c$.

But both of those parts are implemented. The first is just what SemiclassicalOPs.jl does and the second already works in ClassicalOPs.jl. So it's just a well-placed if condition in SemiclassicalOPs.jl to do this.

@dlfivefifty
Copy link
Member Author

what makes you think lanczos is stable for high $c$?

@TSGut
Copy link
Member

TSGut commented Jul 24, 2024

Fair point but we moved away from Lanczos for specifically that reason. You are likely right that for low c where Lanczos is reasonable you can just call the ClassicalOP.jl convertedop directly. I really would prefer we do it properly though. 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants