Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR extends the KrylovKit.eigsolve functionality to support Tensor types and adds integration tests for this new feature.
- Implement Tensor reshaping and permutation logic before eigendecomposition.
- Add integration tests covering both default and Lanczos algorithm usage.
- Include the new Tensor functionality in the test suite.
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/runtests.jl | Added integration test inclusion for KrylovKit. |
| test/integration/KrylovKit_test.jl | Added integration tests for eigsolve with various Tensor scenarios. |
| ext/MuscleKrylovKitExt.jl | Introduced Tensor reshaping utility and eigsolve overloads for Tensors. |
| "The initial guess must have the same left indices as the tensor, but got $(inds(x₀)) and $left_inds." | ||
| ), | ||
| ) | ||
| prod(size.((x₀,), left_inds)) != prod_left_sizes && throw( |
There was a problem hiding this comment.
The error message references '$prod_x₀_sizes' which is not defined. Consider computing prod_x₀_sizes (e.g., prod_x₀_sizes = prod(size.((x₀,), left_inds))) before using it in the error message.
| prod(size.((x₀,), left_inds)) != prod_left_sizes && throw( | |
| prod_x₀_sizes = prod(size.((x₀,), left_inds)) | |
| prod_x₀_sizes != prod_left_sizes && throw( |
There was a problem hiding this comment.
Hola copilot, sí que està definit... Les IA encara no esteu preparades per ser reviewers...
|
nice! next step would be to get it to work with sergio's dmrg example (using a function to compute H\psi instead of storing H, that should be al least a cost cut chi^4 -> chi^3 |
|
After reading the documentation of KrylovKit.jl, this package extension is not needed and actually goes against the recommended usage. Instead, I made I'm not yet closing this PR because the tests are still useful. |
Summary
This PR extends the
KrylovKit.eigsolvefunction forTensors. We added some tests to cover this function too.Example