joelburget / tensor-diagrams

Tensor diagrams - Penrose graphical notation in D3.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tensor diagrams - Penrose graphical notation in D3.js

npm version License Buld status Twitter @QuantumFlytrap

A package for creating visual tensor diagrams using Penrose graphical notation in D3js. For machine learning, deep learning, quantum computing, quantum information, and other array operations. By Piotr Migdał and Claudia Zendejas-Morales from Quantum Flytrap.

A simple live version: https://jsfiddle.net/stared/60ndm3co/.

A work-in-progress article about Tensor Diagrams in Deep Learning, https://p.migdal.pl/art-tensor-diagrams/ and its source https://github.com/stared/art-tensor-diagrams.

Inspirations include:

If you want to use tensors in the browser, you may be looking for the Quantum-Flytrap/quantum-tensors NPM package. If you are looking to visualize complex vectors and operators (especially for quantum computing), see https://github.com/Quantum-Flytrap/bra-ket-vue.

Local setup

Created using a NPM TypeScript frontend boilerplate metachris/typescript-boilerplate, which uses esbuild, and is described in detail in Blog post: Starting a TypeScript Project in 2021.

# Clone the repository
git clone git@github.com:Quantum-Flytrap/tensor-diagrams.git
cd tensor-diagrams

# Install dependencies
yarn install

# Now you can run various yarn commands:
yarn lint
yarn test
yarn build-all
yarn esbuild-browser
yarn docs

Feedback

The easiest feedback is by opening a GitHub Issue.

About

Tensor diagrams - Penrose graphical notation in D3.js

License:MIT License


Languages

Language:TypeScript 87.0%Language:HTML 6.8%Language:CSS 4.5%Language:JavaScript 1.7%