-
Notifications
You must be signed in to change notification settings - Fork 125
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
[ITensors] Add missing kwargs to replacebond!
and downstream functions
#1300
[ITensors] Add missing kwargs to replacebond!
and downstream functions
#1300
Conversation
Thanks, looks good. The tests seem reasonable, though maybe we could leave the current tests as-is and just add a new minimal test that calls |
Note that a few tests were broken by the Julia 1.10 release which are being fixed in #1299, so unrelated to this PR. |
Thanks @mtfishman , I split the calls to replacebond! with svd kwargs into a separate code block in the same testset. I'm not sure if there's some easy configuration that we could check to make sure the relative and absolute cutoffs are actually used, but that wasn't part of the previous test coverage so I held off for now. Lmk what you think. I can rebase after #1299 is merged in |
Looks good, thanks. I think it's sufficient for now just to check it accepts those keyword arguments, ideally those keyword arguments are tested in other parts of the test suite. |
Could you also pass |
Sure, updated. I thought it was only for blocksparse so I left it off originally |
49642f5
to
ac1fdf4
Compare
replacebond!
and downstream functions
[test ITensors mps] |
Run ITensors mps tests from comment trigger: succeeded ✅ |
1 similar comment
Run ITensors mps tests from comment trigger: succeeded ✅ |
Description
A previous PR to ITensors.jl (#1226) refactored away from
kwargs...
in function calls to replacebond!, factorize, and some downstream calls, but missed a few kwargsuse_relative_cutoff
,use_absolute_cutoff
, andmin_blockdim
. This fix adds those back to the high level function and ensures they are passed down correctly into the eigen and svd decomposition routines.Fixes #1297 (see issue for previous behavior)
How Has This Been Tested?
I updated the tests in
test_mps.jl
to include some of these keyword arguments in thereplacebond!
testset. We can add more to increase code coverage, but I wanted to get your thoughts on what I've modified so far before going any further.test/ITensorLegacyMPS/base/test_mps.jl
testsetreplacebond!
Checklist:
using JuliaFormatter; format(".")
in the base directory of the repository (~/.julia/dev/ITensors
) to format your code according to our style guidelines.