Git Product home page Git Product logo

ncon's Introduction

ncon

ncon is a Python 3 package that implements the NCon function as described here: https://arxiv.org/abs/1402.0939 This Python implementation lacks some of the fancier features described in the paper, but the interface is the same.

ncon works with either numpy ndarrays, or the various tensor classes of this package: https://github.com/mhauru/tensors

For usage instructions, check either the paper, or the Julia version of the same function: https://github.com/mhauru/NCon.jl

Also:

def ncon(AA, v, order=None, forder=None, check_indices=True):
    """ AA = [A1, A2, ..., Ap] list of tensors.

    v = (v1, v2, ..., vp) tuple of lists of indices e.g. v1 = [3 4 -1] labels
    the three indices of tensor A1, with -1 indicating an uncontracted index
    (open leg) and 3 and 4 being the contracted indices.

    order, if present, contains a list of all positive indices - if not
    [1 2 3 4 ...] by default. This is the order in which they are contracted.

    forder, if present, contains the final ordering of the uncontracted indices
    - if not, [-1 -2 ..] by default.

    There is some leeway in the way the inputs are given. For example,
    instead of giving a list of tensors as the first argument one can
    give some different iterable of tensors, such as a tuple, or a
    single tensor by itself (anything that has the attribute "shape"
    will be considered a tensor).
    """

ncon's People

Contributors

mhauru avatar

Watchers

James Cloos 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.