This package implements generic tensor networks to compute solution space properties of a class of hard combinatorial optimization problems. The solution space properties include
- The maximum/minimum solution sizes,
- The number of solutions at certain sizes,
- The enumeration/sampling of solutions at certain sizes.
The types of problems that can be solved using this package include Independent set problem, Maximal independent set problem, Spin-glass problem, Cutting problem, Vertex matching problem, Binary paint shop problem, Coloring problem, Dominating set problem, Set packing problem, Satisfiability problem and Set covering problem.
GenericTensorNetworks is a Julia Language package. To install GenericTensorNetworks, please open Julia's interactive session (known as REPL) and press the ] key in the REPL to use the package mode, and then type:
pkg> add GenericTensorNetworks
To update, just type up
in the package mode.
We recommend that you use Julia version >= 1.7; otherwise, your program may suffer from significant (exponential in the tensor dimension) overheads when permuting the dimensions of a large tensor.
If you have to use an older version of Julia, you can overwrite the LinearAlgebra.permutedims!
by adding the following patch to your own project.
# only required when your Julia version is < 1.7
using TensorOperations, LinearAlgebra
function LinearAlgebra.permutedims!(C::Array{T,N}, A::StridedArray{T,N}, perm) where {T,N}
if isbitstype(T)
TensorOperations.tensorcopy!(A, ntuple(identity,N), C, perm)
else
invoke(permutedims!, Tuple{Any,AbstractArray,Any}, C, A, perm)
end
end
Much of the software in this ecosystem was developed as a part of an academic research project. If you would like to help support it, please star the repository. If you use our software as part of your research, teaching, or other activities, we would like to request you to cite our work. The CITATION.bib file in the root of this repository lists the relevant papers.
You can
- Post a question on Julia Discourse forum and ping the package maintainer with
@1115
. - Discuss in the
#graphs
channel of the Julia Slack and ping the package maintainer with@JinGuo Liu
. - Open an issue if you encounter any problems, or have any feature request.