Jutho / TensorKit.jl

A Julia package for large-scale tensor computations, with a hint of category theory
MIT License
231 stars 41 forks source link

about the version of TensorKit #138

Closed sunzhaoyu2000 closed 3 months ago

sunzhaoyu2000 commented 3 months ago

Dear Jutho, I am trying to install PEPSKit.jl, which depends upon TensorKit.jl (with version 0.12.5-0.12). But I can only install TensorKit.jl (with version 1.0.0-dev).

My command to install TensorKit and the output are as follows, and it seems to be successful.

(@v1.10) pkg> add https://github.com/Jutho/TensorKit.jl.git Cloning git-repo https://github.com/Jutho/TensorKit.jl.git Updating git-repo https://github.com/Jutho/TensorKit.jl.git Resolving package versions... Updating ~/sscp/Ising_QFI_open/julia-script/environments/v1.10/Project.toml [07d1fe3e] ~ TensorKit v1.0.0-DEV /home/c2019/Software/QuantumKitHub/TensorKit.jl#master ⇒ v1.0.0-DEV https://github.com/Jutho/TensorKit.jl.git#master Updating ~/sscp/Ising_QFI_open/julia-script/environments/v1.10/Manifest.toml [07d1fe3e] ~ TensorKit v1.0.0-DEV /home/c2019/Software/QuantumKitHub/TensorKit.jl#master ⇒ v1.0.0-DEV `https://github.com/Jutho/TensorKit.jl.git#master

However, when I try to install PEPSKit, some unsatisfiable requirements are reported:

(@v1.10) pkg> add https://github.com/QuantumKitHub/PEPSKit.jl.git Cloning git-repo https://github.com/QuantumKitHub/PEPSKit.jl.git Updating git-repo https://github.com/QuantumKitHub/PEPSKit.jl.git Resolving package versions... ERROR: Unsatisfiable requirements detected for package TensorKit [07d1fe3e]: TensorKit [07d1fe3e] log: ├─possible versions are: 1.0.0 or uninstalled ├─restricted to versions 0.12.5-0.12 by PEPSKit [52969e89] — no versions left │ └─PEPSKit [52969e89] log: │ ├─possible versions are: 0.2.0 or uninstalled │ └─PEPSKit [52969e89] is fixed to version 0.2.0 └─TensorKit [07d1fe3e] is fixed to version 1.0.0-DEV

It seems that PEPSKit needs TensorKit (0.12.5-0.12), but I can only find TensorKit 1.0.0-dev.

I have tried to update all the packages and it doesnot work: (@v1.10) pkg> update Updating git-repo https://github.com/Jutho/TensorKit.jl.git Updating git-repo https://github.com/Jutho/TensorOperations.jl.git Updating git-repo /home/c2019/Software/QuantumKitHub/VectorInterface.jl Updating git-repo /home/c2019/Software/QuantumKitHub/StridedViews.jl Updating git-repo https://github.com/Jutho/Strided.jl.git Updating git-repo https://github.com/Jutho/OptimKit.jl.git Updating git-repo https://github.com/Jutho/KrylovKit.jl.git Updating git-repo /home/c2019/Software/QuantumKitHub/PtrArrays.jl ERROR: empty intersection between TensorKit@1.0.0-DEV and project compatibility 0.12.5-0.12

It is quite confusing to me that I can find TensorKit 0.12.5 (rather than TensorKit 1.0.0) in https://github.com/Jutho/TensorKit.jl, but I cannot install this version.

Any comment and suggestion would be greatly appreciated. Thank you !

lkdvos commented 3 months ago

Hi!

I think the issue is that you are trying to add TensorKit and PEPSKit through their github links. In these cases, you are in fact telling the package manager to use the main branch of that repository, which often contains unfinished or unreleased features. It is usually better to install the officially registered versions, which is done by simply adding the name of the package:

pkg> add TensorKit
pkg> add PEPSKit

This should then automatically resolve the versions such that everything works.

As a side-note, you can always manually fix versions for these packages by appending the version number, commit hash or branch name at the end of the pkg command, more information is found on the documentation site of Pkg.jl: https://pkgdocs.julialang.org/v1/managing-packages/

sunzhaoyu2000 commented 3 months ago

Hi!

I think the issue is that you are trying to add TensorKit and PEPSKit through their github links. In these cases, you are in fact telling the package manager to use the main branch of that repository, which often contains unfinished or unreleased features. It is usually better to install the officially registered versions, which is done by simply adding the name of the package:

pkg> add TensorKit
pkg> add PEPSKit

This should then automatically resolve the versions such that everything works.

As a side-note, you can always manually fix versions for these packages by appending the version number, commit hash or branch name at the end of the pkg command, more information is found on the documentation site of Pkg.jl: https://pkgdocs.julialang.org/v1/managing-packages/

Dear lkdvos,

Thank you for your suggestion.

I tried to install PEPSKit by pkg> add PEPSKit

the output is :

ERROR: The following package names could not be resolved:

Any suggestion?

lkdvos commented 3 months ago

Is it possible that you are using an old version of the General registry? What's the output of pkg> registry st? I think you can try and update that using pkg> registry up, after which PEPSKit should be available.

If this all does not work, you could always go back to manual installation, pkg> add https://github.com/QuantumKitHub/PEPSKit.jl.git, but that really should not be necessary.

sunzhaoyu2000 commented 3 months ago

Is it possible that you are using an old version of the General registry? What's the output of pkg> registry st? I think you can try and update that using pkg> registry up, after which PEPSKit should be available.

If this all does not work, you could always go back to manual installation, pkg> add https://github.com/QuantumKitHub/PEPSKit.jl.git, but that really should not be necessary.

Hi dear lkdvos,

PEPSKit is indeed available now and everything is ok.

(I should have spend more time to study julia.)

Thank you very much ! :)