Giter Site home page Giter Site logo

itensorsvisualization.jl's Introduction

โš ๏ธ INFO: This repository is deprecated

The functionality of ITensorsVisualization has been moved into the monorepo at ITensors.jl. For the latest ITensor visualization functionality, use particular backend packages such as ITensorUnicodePlots or ITensorGLMakie.

ITensorsVisualization

This is a package for visualizing tensor networks. The main purpose is to use it with the ITensors.jl package to view and debug tensor network contractions, for example:

using ITensors
using ITensorsVisualization

i = Index(2, "index_i")
j = Index(10, "index_j")
k = Index(40, "index_k")
l = Index(40, "index_l")
m = Index(40, "index_m")
A = randomITensor(i, j, k)
B = randomITensor(i, j, l, m)
C = randomITensor(k, l)
# Contract the tensors over the common indices
# and visualize the results
ABC = @visualize A * B * C

A window like the following should appear:

alt text

The visualization makes an initial guess for the locations of the tensors (using NetworkLayout.jl), and then allows users to interactively move the tensors to better locations. You can move the tensors and external indices (the square and circle nodes of the network) by left clicking on a node and dragging it to a new location. You can also right click and drag to translate the entire diagram, and scroll to zoom in and out.

In addition, you can pause the execution between contractions to analyze intermediate results:

julia> AB = @visualize A * B pause = true; ABC = @visualize AB * C;
Press C/c and then Enter to continue:
c

This will first visualize the contraction A * B, wait for the user to respond, and then perform the contraction and continue to visualize and perform contraction AB * C. This is helpful for viewing and debugging multistep contractions.

alt text alt text

itensorsvisualization.jl's People

Contributors

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.