-
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
[ITensorMPS] Bond dimensions produced by randomCircuitMPS #870
Conversation
…he chain when determining the maximal reasonable bond dimensions in randomCircuitMPS.
@@ -144,15 +144,28 @@ function randomCircuitMPS( | |||
|
|||
l = Vector{Index}(undef, N) | |||
|
|||
# Compute the bond dimension for each link. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to have this as a separate function, so we could use it other places in the code and simplify the code here.
Maybe linkdims_upper_bound
? It doesn't have to be exported, just internal use for now.
Thanks @markusschmitt. My major concern here would be ensuring that by truncating in this way the orthogonality center is still at site |
Yes, let me check that. I am actually not sure. |
If it does turn out to be an issue, a simple fix would be to determine at what site the orthogonality gets broken (say site |
@dylex do you know why the Jenkins test failed here? I've been seeing occasional errors, can we just increase the |
I thought I fixed this but maybe it's still not right. I'll take a closer look. In the mean time I manually re-ran the test and now it's failing for non-timeout reasons at least. |
Thanks. Indeed, this PR broke a test. Is there a way that I can rerun tests (without making a new commit)? I didn't see a way from the Jenkins online interface (https://jenkins.flatironinstitute.org/blue/organizations/jenkins/ITensors.jl/detail/PR-870/2/pipeline). |
If you register a user on jenkins I can add you to be able to trigger builds. |
That would be great, thanks. I just registered with the User ID "Matthew" and name "Matthew Fishman". |
Nice to see this "bounding" approach to solving the issue, Markus. I think if we can verify even theoretically that the extra truncations still preserve or guaranteed the right-orthogonality property of the MPS tensors (so that the orthogonality center remains well-defined and at site 1) then we're in business. |
I think the right-orthogonality may be guaranteed to remain true for any value of chi, including the new values being determined by the code in this PR. The reason is that chi is fed into the function _rmatrix, which makes a unitary (or orthogonal if real) matrix of the requested dimensions. So as long as the column dimensions of these matrices are greater than or equal to the row dimensions (in this case, as long as |
@emstoudenmire: I think the condition I also checked the orthogonality as follows:
This could be added as a test, possibly with different smaller |
Great – I just checked and we do already have a similar test in our test/mps.jl file, so no need to add another one, but it's good you did that check yourself. The new test you added is good to have to ensure the bond dimensions now have the minimal values. The current test isn't passing, though, because Also it looks like you'll need to make the update pointed out by Matt, about changing the name |
Sorry, I am only getting back to this now. With the new commits the tests should pass. I had to slightly change another test as well. |
Codecov Report
@@ Coverage Diff @@
## main ITensor/ITensors.jl#870 +/- ##
==========================================
+ Coverage 67.12% 67.14% +0.02%
==========================================
Files 88 88
Lines 9389 9395 +6
==========================================
+ Hits 6302 6308 +6
Misses 3087 3087
Continue to review full report at Codecov.
|
This issue should get transferred to ITensorMPS.jl, I'll close it since the corresponding issue is being tracked there: ITensor/ITensorMPS.jl#69. |
Description
Fixes ITensor/ITensorMPS.jl#69
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
test/mps.jl
as testset "randomCircuitMPS bond dimensions".Checklist:
using JuliaFormatter; format(".")
in the base directory of the repository (~/.julia/dev/ITensors
) to format your code according to our style guidelines.