-
Notifications
You must be signed in to change notification settings - Fork 0
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
General affine transforms #30
base: main
Are you sure you want to change the base?
Conversation
Rationals we have to think about still a bit...
This basically works because the reciprocal of an odd integer is again integer as long as you do in modulo arithmetic, so we can reduce it to the case we already consider.
This more closely aligns to the Julia 1.11 function `invmod`.
But right now the QTTs are not optimal in terms of bond dimension.
Immutability is a blessing - there was a spurious accumulation of the carry. With this change, we are now able to do the important transformation (x,x') -> 1/2 * (x + x', x - x') with periodic boundary conditions and without.
Yes, it should handle these cases just fine. The test For open boundary conditions, there is a strange issue that if the denominator is not one and the shift is very large that you get wrong results; I think it has to do with the way we handle the outgoing carry of the first tensor. |
OK, let me examine your code. BTW, should we implement a linear interpolation in another PR? |
I agree that this is needed. I also agree that this should be a separate PR, this code is complicated enough as it is. In principle, once this code is merged, one can use the sum of several MPOs to emulate this. For example, one could do three MPOs: |
The PR implements QTTs for arbitrary affine transforms
y = A*x +b
. In particular, it constructs (fused-representation) MPOs for the boolean matrices:where
A
is anM x N
matrixb
is anN
vector, with arbitrary rational coefficients.The core function added is
affine_transform_mpo
, which returns an ITensor MPO for a given affine transform.For
PeriodicBoundaryConditions( )
, I have not encountered any problems. ForOpenBoundaryConditions
, it also works almost all of the time. The only thing case that I found does not work for now is whenb*s > 2^R
.