bsc-quantic / Tenet.jl

Composable Tensor Network library in Julia
https://bsc-quantic.github.io/Tenet.jl/
Apache License 2.0
17 stars 1 forks source link

Replace the global index counter generator for a local data structure #170

Closed mofeing closed 5 days ago

mofeing commented 2 weeks ago

There have been reports that when generating too many indices automatically (using the atomic counter) in the same Julia session, it breaks.

This usually happens due to repeatedly generating TensorNetworks.

This PR fixes it by introducing IndexCounter: a small wrapper over the currently global behaviour. If merged, all TensorNetworks would start from the same index.