GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Quantum-Flytrap/quantum-tensors: Quantum Tensors - NPM package for sparse matrix operations for quantum information and computing

BranchesTags
Open more actions menu

Latest commit

 

History

397 Commits
397 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.vscode
.vscode
 
 
benchmarks
benchmarks
 
 
demos
demos
 
 
imgs
imgs
 
 
src
src
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
.eslintrc.js
.eslintrc.js
 
 
.gitignore
.gitignore
 
 
.prettierrc.js
.prettierrc.js
 
 
CHANGELOG.md
CHANGELOG.md
 
 
README.md
README.md
 
 
package.json
package.json
 
 
rollup.config.js
rollup.config.js
 
 
tsconfig.json
tsconfig.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

Quantum Tensors

npm version License Build Docs Coverage Status Twitter @QuantumFlytrap

A TypeScript package for sparse tensor operations on complex numbers in your browser - for quantum computing, quantum information, and interactive visualizations of quantum physics. For more details, see our preprint:

  • P. Migdał, K. Jankiewicz, P. Grabarz, et al., Visualizing quantum mechanics in an interactive simulation - Virtual Lab by Quantum Flytrap, arXiv:2203.13300

Quantum Tensors are developed by Quantum Flytrap and were supported by the Centre of Quantum Technologies, National University of Singapore. They are a part of the Quantum Game 2 project, are used in BraKetVue quantum state visualizer, and serve as a prototype for numerics for Virtual Lab by Quantum Flytrap, and in an interactive blog post:

  • C. Zendejas-Morales, P. Migdał, Quantum logic gates for a single qubit, interactively

Documentation: quantum-flytrap.github.io/quantum-tensors (generated by TypeDoc). Some examples of its usage are demos, tests folders.

We base the philosophy of this package on:

  • Sparse operations (both for vectors and matrices)
  • Complex numbers
  • Tensor structure
  • Named tensor dimensions (vide Tensors considered harmful): there is a difference between a 2x2 operator on spin and polarization. It helps with catching errors.

A few insights on contributing, and starting your projects, are in How I Learned to Stop Worrying and Love the Types & Tests: the Zen of Python for TypeScript by Piotr Migdał.

Quantum Tensors logo

Installation

The easiest way is to install from the NPM repository:

npm install quantum-tensors

Or, if you use yarn package manager,

yarn add quantum-tensors

If you want to install a development version, you can get this package directly from this GitHub repository. In this case, the commands are:

npm install Quantum-Flytrap/quantum-tensors#master

Or if you use yarn:

yarn add Quantum-Flytrap/quantum-tensors#master

Usage

And then in your project write:

import * as qt from 'quantum-tensors'

Also, https://github.com/stared/thinking-in-tensors-writing-in-pytorch by Piotr Migdał.

Contributing

  • Create TSDoc for each new function, class, and method
  • Setup ESLint configured as in this .eslintrc.js
  • Try to adhere to Angular-like commit style

Citing

  • P. Migdał, K. Jankiewicz, P. Grabarz, et al., Visualizing quantum mechanics in an interactive simulation - Virtual Lab by Quantum Flytrap, arXiv:2203.13300
@article{migdal_visualizing_2022,
	title = {Visualizing quantum mechanics in an interactive simulation -- {Virtual} {Lab} by {Quantum} {Flytrap}},
	url = {http://arxiv.org/abs/2203.13300},
	journal = {arXiv:2203.13300 [quant-ph]},
	author = {Migdał, Piotr and Jankiewicz, Klementyna and Grabarz, Paweł and Decaroli, Chiara and Cochin, Philippe},
	month = mar,
	year = {2022},
	note = {arXiv: 2203.13300}
}

About

Quantum Tensors - NPM package for sparse matrix operations for quantum information and computing

quantum-flytrap.github.io/quantum-tensors/

Topics

complex-numbersmatrixquantum-computingquantum-gamequantum-informationquantum-mechanicsquantum-tensorstensortypescriptvector

Resources

Readme
Activity
Custom properties

Stars

59 stars

Watchers

4 watching

Forks

13 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.