{"id":17685524,"url":"https://github.com/adamisntdead/qics","last_synced_at":"2025-06-13T11:09:07.420Z","repository":{"id":143904042,"uuid":"79748966","full_name":"adamisntdead/qics","owner":"adamisntdead","description":"Javascript Idealistic Quantum Computer SImulation Library","archived":false,"fork":false,"pushed_at":"2018-08-14T20:55:14.000Z","size":1365,"stargazers_count":6,"open_issues_count":17,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-13T11:09:05.810Z","etag":null,"topics":["gate","matrix","quantum-computing","quantum-programming-language","qubits","simulation"],"latest_commit_sha":null,"homepage":"https://adamisntdead.github.io/qics/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamisntdead.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-22T22:02:35.000Z","updated_at":"2025-04-19T15:21:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"74634650-f628-4659-ab42-3b9e3beb37b7","html_url":"https://github.com/adamisntdead/qics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adamisntdead/qics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamisntdead%2Fqics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamisntdead%2Fqics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamisntdead%2Fqics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamisntdead%2Fqics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamisntdead","download_url":"https://codeload.github.com/adamisntdead/qics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamisntdead%2Fqics/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259634372,"owners_count":22887699,"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","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":["gate","matrix","quantum-computing","quantum-programming-language","qubits","simulation"],"created_at":"2024-10-24T10:28:05.465Z","updated_at":"2025-06-13T11:09:07.398Z","avatar_url":"https://github.com/adamisntdead.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Qics - _Quantum Idealistic Computer Simulator_\n\n[![GitHub issues](https://img.shields.io/github/issues/adamisntdead/qics.svg)](https://github.com/adamisntdead/qics/issues)\n[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/adamisntdead/qics/master/LICENSE)\n[![Travis](https://img.shields.io/travis/adamisntdead/qics.svg)](https://travis-ci.org/adamisntdead/qics)\n[![npm](https://img.shields.io/npm/v/qics.svg)](https://www.npmjs.com/package/qics)\n[![Greenkeeper badge](https://badges.greenkeeper.io/adamisntdead/qics.svg)](https://greenkeeper.io/)\n\n\nQics is an Idealistic, Quantum Computer Simulation Library.\nIt works by holding a Quantum Register as a Matrix,\nand then multiplying that against various\nGate Matrices.\nFor more information about the working,\nsee the `src` directory for the source code,\nor see `examples/node.js` or the __Usage__ Section for information\non the usage of the module.\n\n***\n\n### Features\n* A ['Universally Complete'](https://en.wikipedia.org/wiki/Quantum_gate#Universal_quantum_gates),  [Quantum Circuit](https://en.wikipedia.org/wiki/Quantum_circuit) Based Simulator\n* Gate Expansion Function (To make a single qubit gate work on a register with multiple qubits)\n* Relatively Simple To Use\n* Inline Documentation with Docco\n\n***\n\n### Usage\nCurrently the library is available using Node.js and NPM.\nTo install the module, use the command:\n```shell\nnpm install qics\n```\n(_NOTE: Works with Node.js Versions \u003e= 4_)\n\nIf you want to use this in the browser, just add the `qics.js` or `qics.min.js`\nfrom the `dist` folder\n\nThen you are able to use the module.\nWhen it's installed, _Qics_ exposes two classes,\n`qics.Register` and `qics.gates`.\n\n`qics.Register` is the main class, and is the basis of\nthe simulator.\nIt is used like any other class using the `new` keyword.\nOnce initiated, there is a number of methods, see below or\nthe Documentation.\n\n`qics.gates` exposes all of the single qubit gates as 2D arrays.\nIt also has some static methods, such as `generateGate()`.\nAgain, see the documentation.\n\n__Example simulation:__\n```javascript\n// Import the module\nconst qics = require('qics');\n\n// Create a new Quantum Register with 3 Qubits\nconst reg = new qics.Register(3);\n\n// Apply some gates.\n// Hadamard Gate\nreg.applyGate('H', 1);\n// CNOT Gate, with control as qubit 1, and the\n// target as qubit 3\nreg.applyGate('CNOT', 1, 3) ;\n\n// Now measure the register. Should return either \"000\" or \"101\"\nconsole.log(reg.measure());\n```\n\nYou can also use your own gates, by inputing them as an Array or Math.Matrix object\nto the applyGate function.\n\n```javascript\n// Manually Add A NOT Gate\n\nconst reg = new qics.Register(2);\n\nreg.applyGate([\n  [0, 1],\n  [1, 0]\n], 1);\n\n\n// Now measure the register. Should return either \"10\"\nconsole.log(reg.measure());\n```\n***\n\n### Documentation\n\nThis library is documented using Inline Prose Comments, and then generated using Docco.\nThe documentation is just source code comments, but the source isn't too complex, and the functions\nare quite clear to use.\n\n__To read the docs, Checkout [Here!](https://adamisntdead.github.io/qics/)__\n\nTo deploy the docs to the github pages, run\n```shell\ngit subtree push --prefix docs origin gh-pages\n```\nTo build the docs, run `npm run docs`.\n\n***\n\n### Build\nFirst you need to clone the repo from github:\n```shell\ngit clone git://github.com/adamisntdead/qics.git\ncd qics\n```\n\nThen install the dependencies:\n```shell\nnpm install\n```\nThen you can run the build script:\n```shell\nnpm run build\n```\nThis will build the module, and output to the `lib` folder.\nIf you want to build for client side (i.e. in the browser), run\n`npm run build:all` and then it will output _qics.js_ and _qics.min.js_ to the `dist` folder.\n\n### Tests\nTo run the test for this module, after cloning and installing,\nrun:\n```shell\nnpm run test\n```\nAnd it will run all of the tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamisntdead%2Fqics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamisntdead%2Fqics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamisntdead%2Fqics/lists"}