Demo: https://klezm.github.io/bloch
This a Bloch sphere simulator. It allows you to enter arbitrary 2x2 matrices and see their effect on the quantum state.
The project uses Node.js for its build. At the time of writing, the project was confirmed to work with v14.15.1 of Node.js but other versions might be appropriate too. If you want to run multiple different versions of Node.js on your machine, then you might find nvm useful.
- Check the repo out
- Run
npm install
- Run
npm run start
or simply npm install; npm run start
or npx npm-check-updates -i; npm install; npm run start
(for checking latest packages as well)
https://stackblitz.com/github/klezm/bloch
Run
npm run test
to run only a specific test file run:
npm run test -- tests/parser.test.ts # jest -- tests/parser.test.ts
to run just a specific test run:
npm run test -- -t 'Pauli-X' # <- the description of the test
npm install npm-check-updates
or when using stackblitz (which uses turbo instead of yarn or npm)
turbo add --dev npm-check-updates