Code Monkey home page Code Monkey logo

itensorinfinitemps.jl's Introduction

ITensorInfiniteMPS

Introduction

This is a package for working with infinite MPS based on the ITensors.jl library. The goal is to provide basic tools for infinite MPS that match the functionality that is available for finite MPS in ITensors.jl, for example gauging infinite MPS with orthogonalize, InfiniteMPS + InfiniteMPS, InfiniteMPO * InfiniteMPS, gate evolution, computing low-lying excited states with VUMPS, etc.

Installation

The package is currently not registered. Please install with the commands:

julia> using Pkg; Pkg.add(url="https://github.com/mtfishman/ITensorInfiniteMPS.jl.git")

Examples

This package is a work in progress. Here are some examples of the interface:

julia> using ITensors, ITensorInfiniteMPS

julia> s = siteinds("S=1/2", 3)
3-element Array{Index{Int64},1}:
 (dim=2|id=652|"S=1/2,Site,n=1")
 (dim=2|id=984|"S=1/2,Site,n=2")
 (dim=2|id=569|"S=1/2,Site,n=3")

julia> ψ = InfiniteMPS(s) # Infinite MPS with 3-site unit cell
InfiniteMPS
[1] IndexSet{3} (dim=1|id=317|"Link,c=0,l=3") (dim=2|id=652|"S=1/2,Site,c=1,n=1") (dim=1|id=77|"Link,c=1,l=1")
[2] IndexSet{3} (dim=1|id=77|"Link,c=1,l=1") (dim=2|id=984|"S=1/2,Site,c=1,n=2") (dim=1|id=868|"Link,c=1,l=2")
[3] IndexSet{3} (dim=1|id=868|"Link,c=1,l=2") (dim=2|id=569|"S=1/2,Site,c=1,n=3") (dim=1|id=317|"Link,c=1,l=3")


julia> ψ[2] == replacetags(ψ[5], "c=2" => "c=1") # Indexing outside of the unit cell gets tensors from other unit cells
true

julia> ψ₁ = ψ[1:3] # Create a finite MPS from the tensors of the first unit cell
MPS
[1] IndexSet{3} (dim=1|id=317|"Link,c=0,l=3") (dim=2|id=652|"S=1/2,Site,c=1,n=1") (dim=1|id=77|"Link,c=1,l=1")
[2] IndexSet{3} (dim=1|id=77|"Link,c=1,l=1") (dim=2|id=984|"S=1/2,Site,c=1,n=2") (dim=1|id=868|"Link,c=1,l=2")
[3] IndexSet{3} (dim=1|id=868|"Link,c=1,l=2") (dim=2|id=569|"S=1/2,Site,c=1,n=3") (dim=1|id=317|"Link,c=1,l=3")


julia> ψ₂ = ψ[4:6] # Create a finite MPS from the tensors of the second unit cell
MPS
[1] IndexSet{3} (dim=1|id=317|"Link,c=1,l=3") (dim=2|id=652|"S=1/2,Site,c=2,n=1") (dim=1|id=77|"Link,c=2,l=1")
[2] IndexSet{3} (dim=1|id=77|"Link,c=2,l=1") (dim=2|id=984|"S=1/2,Site,c=2,n=2") (dim=1|id=868|"Link,c=2,l=2")
[3] IndexSet{3} (dim=1|id=868|"Link,c=2,l=2") (dim=2|id=569|"S=1/2,Site,c=2,n=3") (dim=1|id=317|"Link,c=2,l=3")

Useful operations like gauging and optimization are in progress, so stay tuned!

itensorinfinitemps.jl's People

Contributors

ebertok avatar github-actions[bot] avatar hershsingh avatar lherviou avatar mtfishman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.