Giter Club home page Giter Club logo

catn's Introduction

CATN

Contracting Arbitrary Tensor Networks

This repo contains the numpy and pytorch implementations of the algorithm proposed in arXiv:1912.03014 for approximately contracting arbitrary tensor networks. Several examples are included for demonstrating the performance of our algorithm.

Examples for computing free energy of graphical models:

  • Spin glasses on a regular random graph with $50$ spins, degree $3$, and $\beta=0.1$

python lnz_np.py -n 50 -beta 0.1 -k 3 -graph rrg -seed 1 -Dmax 20 -chi 500 -Jij randn -fvs -mf

  • 2d ferromagnetic Ising model on a $10\times 10$ squared lattice, $\beta=0.2$

python lnz_np.py -n 10 -beta 0.2 -graph 2dsquare -select 1 -seed 1 -Dmax 50 -chi 500 -node mps -Jij ferro -reverse 1 -compress

  • Sherrington-Kirkpatrick model (fully connected, couplings following Gaussian distribution) with $20$ spins.

python lnz_np.py -n 20 -beta 0.2 -graph complete -seed 1 -Dmax 50 -chi 500 -Jij sk -reverse 0 -compress -fvs -mf

  • Spin glasses on a small-world network with $50$ spins, degree $4$, re-connecting probability $0.4$

python lnz_np.py -n 50 -beta 0.2 -k 4 -graph sw -select 1 -seed 1 -Dmax 50 -chi 500 -node mps -Jij randn -reverse 1 -compress -fvs -mf

  • Contract a circuit with $10\times 10=100$ qubits, with depth (1+8+1), as stored in graphs/supremacy2d100-d10-seed1-rank3-new...., with physical bond dimension $D=600$ and inner bond dimension $\chi=1500$

First run pip install fire, then python ./qc.py -graph supremacy2d100-d10-seed1-rank3-new -Dmax 600 -chi 1500

catn's People

Contributors

panzhang83 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.