{"id":26552099,"url":"https://github.com/quantum-flytrap/quantum-tensors","last_synced_at":"2025-10-13T09:35:00.982Z","repository":{"id":42618868,"uuid":"192385310","full_name":"Quantum-Flytrap/quantum-tensors","owner":"Quantum-Flytrap","description":"Quantum Tensors - NPM package for sparse matrix operations for quantum information and computing","archived":false,"fork":false,"pushed_at":"2023-01-07T04:20:01.000Z","size":1704,"stargazers_count":59,"open_issues_count":3,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-27T06:23:18.650Z","etag":null,"topics":["complex-numbers","matrix","quantum-computing","quantum-game","quantum-information","quantum-mechanics","quantum-tensors","tensor","typescript","vector"],"latest_commit_sha":null,"homepage":"https://quantum-flytrap.github.io/quantum-tensors/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Quantum-Flytrap.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-17T16:51:30.000Z","updated_at":"2025-08-25T16:47:28.000Z","dependencies_parsed_at":"2023-02-06T11:30:17.255Z","dependency_job_id":null,"html_url":"https://github.com/Quantum-Flytrap/quantum-tensors","commit_stats":null,"previous_names":["quantum-game/quantum-tensors","stared/quantum-tensors"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/Quantum-Flytrap/quantum-tensors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantum-Flytrap%2Fquantum-tensors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantum-Flytrap%2Fquantum-tensors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantum-Flytrap%2Fquantum-tensors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantum-Flytrap%2Fquantum-tensors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Quantum-Flytrap","download_url":"https://codeload.github.com/Quantum-Flytrap/quantum-tensors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantum-Flytrap%2Fquantum-tensors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014525,"owners_count":26085536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["complex-numbers","matrix","quantum-computing","quantum-game","quantum-information","quantum-mechanics","quantum-tensors","tensor","typescript","vector"],"created_at":"2025-03-22T08:23:46.370Z","updated_at":"2025-10-13T09:35:00.953Z","avatar_url":"https://github.com/Quantum-Flytrap.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quantum Tensors\n\n[![npm version](https://badge.fury.io/js/quantum-tensors.svg)](https://badge.fury.io/js/quantum-tensors)\n![License](https://img.shields.io/npm/l/quantum-tensors)\n![Build](https://github.com/Quantum-Flytrap/quantum-tensors/actions/workflows/build_test.yml/badge.svg)\n![Docs](https://github.com/Quantum-Flytrap/quantum-tensors/actions/workflows/publish_docs.yml/badge.svg)\n[![Coverage Status](https://codecov.io/gh/Quantum-Flytrap/quantum-tensors/branch/master/graph/badge.svg)](https://codecov.io/gh/Quantum-Flytrap/quantum-tensors/)\n[![Twitter @QuantumFlytrap](https://img.shields.io/twitter/follow/QuantumFlytrap)](https://twitter.com/QuantumFlytrap)\n\nA 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:\n\n- P. Migdał, K. Jankiewicz, P. Grabarz, et al., [Visualizing quantum mechanics in an interactive simulation - Virtual Lab by Quantum Flytrap](https://arxiv.org/abs/2203.13300), arXiv:2203.13300\n\nQuantum Tensors are developed by [Quantum Flytrap](https://quantumflytrap.com/) and were supported by the [Centre of Quantum Technologies](https://www.quantumlah.org/), National University of Singapore. They are a part of the [Quantum Game 2](https://github.com/Quantum-Game/quantum-game-2) project, are used in [BraKetVue](https://github.com/Quantum-Flytrap/bra-ket-vue) quantum state visualizer, and serve as a prototype for numerics for [Virtual Lab by Quantum Flytrap](https://lab.quantumflytrap.com/), and in an interactive blog post:\n\n- C. Zendejas-Morales, P. Migdał, [Quantum logic gates for a single qubit, interactively](https://quantumflytrap.com/blog/2021/qubit-interactively/)\n\nDocumentation: [quantum-flytrap.github.io/quantum-tensors](https://quantum-flytrap.github.io/quantum-tensors/) (generated by [TypeDoc](https://typedoc.org/)). Some examples of its usage are [demos](https://github.com/Quantum-Flytrap/quantum-tensors/tree/master/demos), [tests](https://github.com/Quantum-Flytrap/quantum-tensors/tree/master/demos) folders.\n\nWe base the philosophy of this package on:\n\n- Sparse operations (both for vectors and matrices)\n- Complex numbers\n- Tensor structure\n- Named tensor dimensions (vide [Tensors considered harmful](http://nlp.seas.harvard.edu/NamedTensor)): there is a difference between a 2x2 operator on spin and polarization. It helps with catching errors.\n\nA few insights on contributing, and starting your projects, are in [How I Learned to Stop Worrying and Love the Types \u0026 Tests: the Zen of Python for TypeScript](https://p.migdal.pl/2020/03/02/types-tests-typescript.html) by Piotr Migdał.\n\n![Quantum Tensors logo](imgs/quantum-tensors-logo.jpg)\n\n## Installation\n\nThe easiest way is to install from [the NPM repository](https://www.npmjs.com/package/quantum-tensors):\n\n```\nnpm install quantum-tensors\n```\n\nOr, if you use [yarn](https://yarnpkg.com/) package manager,\n\n```\nyarn add quantum-tensors\n```\n\nIf you want to install a development version, you can get this package directly from this GitHub repository. In this case, the commands are:\n\n```\nnpm install Quantum-Flytrap/quantum-tensors#master\n```\n\nOr if you use yarn:\n\n```\nyarn add Quantum-Flytrap/quantum-tensors#master\n```\n\n## Usage\n\nAnd then in your project write:\n\n```{ts}\nimport * as qt from 'quantum-tensors'\n```\n\nAlso, [https://github.com/stared/thinking-in-tensors-writing-in-pytorch](https://github.com/stared/thinking-in-tensors-writing-in-pytorch) by Piotr Migdał.\n\n## Contributing\n\n- Create [TSDoc](https://www.npmjs.com/package/@microsoft/tsdoc) for each new function, class, and method\n- Setup [ESLint](https://eslint.org/) configured as in this `.eslintrc.js`\n- Try to adhere to [Angular-like commit style](https://github.com/angular/angular/blob/master/CONTRIBUTING.md)\n\n## Citing\n\n- P. Migdał, K. Jankiewicz, P. Grabarz, et al., [Visualizing quantum mechanics in an interactive simulation - Virtual Lab by Quantum Flytrap](https://arxiv.org/abs/2203.13300), arXiv:2203.13300\n\n```\n@article{migdal_visualizing_2022,\n\ttitle = {Visualizing quantum mechanics in an interactive simulation -- {Virtual} {Lab} by {Quantum} {Flytrap}},\n\turl = {http://arxiv.org/abs/2203.13300},\n\tjournal = {arXiv:2203.13300 [quant-ph]},\n\tauthor = {Migdał, Piotr and Jankiewicz, Klementyna and Grabarz, Paweł and Decaroli, Chiara and Cochin, Philippe},\n\tmonth = mar,\n\tyear = {2022},\n\tnote = {arXiv: 2203.13300}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantum-flytrap%2Fquantum-tensors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantum-flytrap%2Fquantum-tensors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantum-flytrap%2Fquantum-tensors/lists"}