Skip to content

Latest commit

 

History

History
77 lines (53 loc) · 3.5 KB

File metadata and controls

77 lines (53 loc) · 3.5 KB

TensorKitAdapters.jl

Documentation Downloads
Downloads
Build Status Coverage Style Guide Quality assurance
CI Codecov code style: runic Aqua QA

TensorKitAdapters.jl provides adapters to convert between the TensorMap type of TensorKit.jl and other tensor libraries like ITensors.jl.

Installation

The package is registered in the Julia general registry. It can be installed trough the package manager with the following command:

pkg> add TensorKitAdapters

Code Samples

julia> using TensorKitAdapters, TensorKit
julia> using ITensors
julia> i = Index([QN("Sz"=>-1)=>2, QN("Sz"=>0)=>1]);
julia> A = random_itensor(Float64, i, dag(prime(i)));
julia> T = TensorMap(A);
julia> A_reconstructed = ITensor(T; ids = ITensors.id.(inds(A)), plevs = plev.(inds(A)));
julia> T_reconstructed = TensorMap(A_reconstructed);
julia> A  A_reconstructed
true
julia> T  T_reconstructed
true

License

TensorKitAdapters.jl is licensed under the MIT License. By using or interacting with this software in any way, you agree to the license of this software.