Comments (4)
Sorry, I just noticed this. I'm not sure why I don't get notifications about issues raised, I'll have to look into my settings.
Thanks for pointing that out. It would be great to have ITensors
working with Optim
. I'll look into the best way to get it working (it may be just adding the solution that Julia recommends).
from ndtensors.jl.
This should be fixed on master and will be included in the next ITensors release (v0.1.38), please let me know if you continue to have problems like this.
from ndtensors.jl.
Hi,
I'm not sure whether I should be posting in this Issue or opening a new one - apologies if the latter. Today I tried using ITensors.jl to do some calculations and had this same problem. If I use a package which depends on ArrayInterface.jl and then try to run, for instance, the first half of the DMRG example script https://itensor.org/docs.cgi?vers=julia&page=getting_started/dmrg :
using ITensors
let
N = 100
sites = siteinds("S=1",N)
ampo = AutoMPO()
for j=1:N-1
ampo += "Sz",j,"Sz",j+1
ampo += 1/2,"S+",j,"S-",j+1
ampo += 1/2,"S-",j,"S+",j+1
end
H = MPO(ampo,sites)
end
I get the same error. I fixed it by extending your fix to accept two integer arguments
# This is needed to fix an ambiguity error with ArrayInterface.jl
# https://github.com/ITensor/NDTensors.jl/issues/62
@propagate_inbounds function setindex(T::EmptyTensor, x, I::Int, J::Int)
return _setindex(T, x, I, J)
end
I assume this happens because when constructing the MPO from the AutoMPO, ITensors needs to set two indices at once when instantiating the local operators, and the previous solution only fixed it when setting one index.
from ndtensors.jl.
Thanks for pointing that out, I'm fixing it now (more generically by defining setindex(T::EmptyTensor, x, I::Int...)
).
from ndtensors.jl.
Related Issues (20)
- Improve Unit Tests HOT 1
- Make a lazily permuted Tensor wrapper
- Try to simplify the overload requirements for inds HOT 4
- Contraction logic optimizations
- Extend Spectrum definition HOT 1
- Small contraction optimizations HOT 1
- Remove extraneous functions from export list
- Replace `fullfidelity(::MPO, ::MPO)` with `fidelity(::ITensor, ::ITensor)` HOT 1
- Contracting DiagTensor with DenseTensor may be a bit slow HOT 2
- TagBot trigger issue HOT 21
- Use nonzeros as an alternative name for data HOT 1
- Drop zero blocks during uncombining
- Bug in DiagBlockSparseTensor show method
- Allow specifying the element type in `random_unitary`/`random_orthog`
- Introduce `setstorage` and `setinds`
- Use new `setstorage` and `setdata` to decrease code duplication across storage types HOT 1
- Simplify `contract!` overloading logic
- Change GEMM/matmul! backend switching interface
- Simplify `_contract_scalar!` logic by using `LoopVectorization.jl`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ndtensors.jl.