bra-ket-vue
TypeScript icon, indicating that this package has built-in type declarations

0.4.3 • Public • Published

bra-ket-vue / ⟨𝜑|𝜓⟩.vue

npm version License Build Status Twitter @QuantumGameIO

A visualizer for quantum states and matrices. In Vue.js. See live examples with code, or just live examples.

By Piotr Migdał (quantum physics & programming) and Klem Jankiewicz (UX & design) from Quantum Flytrap.

Unitary Fund

Installation

For a node project use:

npm install bra-ket-vue

or for yarn:

yarn add bra-ket-vue

For browser HTML files, put in <head>...</head>:

<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://unpkg.com/quantum-tensors"></script>
<script src="https://unpkg.com/bra-ket-vue"></script>

Or if you want to stick to specific versions

<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.0.0-rc.10/vue.esm-browser.prod.js"></script>
<script src="https://unpkg.com/quantum-tensors@0.4.11/dist/quantum-tensors.min.js"></script>
<script src="https://unpkg.com/bra-ket-vue@0.4.1/dist/bra-ket-vue.min.js"></script>

For some applications you may want to read a bit about Vue.js.

Note: up to 0.3.1 it used Vue 2. Starting from 0.4.0 it uses Vue 3.

Examples

Here are examples in the dark style. All components are available in two styles: dark and bright. By default we use the dark style. Each vector is a Vector object from Quantum Tensors, and each operator is an Operator object.

States (vectors)

Ket list for quantum computing

Ket list for quantum optics

<ket-viewer :vector="vector" :dark-mode="true" />

Ket

Operators (matrices)

<matrix-viewer :operator="operator" :dark-mode="true" />

Matrix - beam-splitter

Matrix - CNOT gate

Matrix - Toffoli gate

Live examples with code

Notes

This repo was created using a script vue-sfc-rollup (a Vue component library generator, for JavaScript and TypeScript).

For more, see packaging Vue v2 Components for npm in the official Vue documentation.

Readme

Keywords

none

Package Sidebar

Install

npm i bra-ket-vue

Weekly Downloads

17

Version

0.4.3

License

MIT

Unpacked Size

1.33 MB

Total Files

52

Last publish

Collaborators

  • pmigdal