项目作者: Quantum-Game

项目描述 :
Quantum Tensors - NPM package for sparse matrix operations for quantum information and computing
高级语言: TypeScript
项目地址: git://github.com/Quantum-Game/quantum-tensors.git
创建时间: 2019-06-17T16:51:30Z
项目社区:https://github.com/Quantum-Game/quantum-tensors

开源协议:

下载


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:

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:

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:

  1. npm install quantum-tensors

Or, if you use yarn package manager,

  1. 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:

  1. npm install Quantum-Flytrap/quantum-tensors#master

Or if you use yarn:

  1. yarn add Quantum-Flytrap/quantum-tensors#master

Usage

And then in your project write:

  1. import * as qt from 'quantum-tensors'

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

Contributing

Citing

  1. @article{migdal_visualizing_2022,
  2. title = {Visualizing quantum mechanics in an interactive simulation -- {Virtual} {Lab} by {Quantum} {Flytrap}},
  3. url = {http://arxiv.org/abs/2203.13300},
  4. journal = {arXiv:2203.13300 [quant-ph]},
  5. author = {Migdał, Piotr and Jankiewicz, Klementyna and Grabarz, Paweł and Decaroli, Chiara and Cochin, Philippe},
  6. month = mar,
  7. year = {2022},
  8. note = {arXiv: 2203.13300}
  9. }