{"id":32244831,"url":"https://github.com/davidbkemp/animated-qubits","last_synced_at":"2026-02-19T09:04:35.119Z","repository":{"id":12697088,"uuid":"15369461","full_name":"davidbkemp/animated-qubits","owner":"davidbkemp","description":"JavaScript library for creating graphical visualisations and animations","archived":false,"fork":false,"pushed_at":"2025-03-01T04:53:43.000Z","size":1368,"stargazers_count":13,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-23T11:58:36.136Z","etag":null,"topics":["jsqubits","quantum-computing"],"latest_commit_sha":null,"homepage":"http://davidbkemp.github.io/animated-qubits/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidbkemp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-22T03:03:08.000Z","updated_at":"2025-03-01T04:56:24.000Z","dependencies_parsed_at":"2022-08-31T00:12:12.654Z","dependency_job_id":null,"html_url":"https://github.com/davidbkemp/animated-qubits","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/davidbkemp/animated-qubits","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbkemp%2Fanimated-qubits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbkemp%2Fanimated-qubits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbkemp%2Fanimated-qubits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbkemp%2Fanimated-qubits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidbkemp","download_url":"https://codeload.github.com/davidbkemp/animated-qubits/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbkemp%2Fanimated-qubits/sbom","scorecard":{"id":326140,"data":{"date":"2025-08-11","repo":{"name":"github.com/davidbkemp/animated-qubits","commit":"da03eb85b36e42893e124345226bb216c96e4eff"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T02:31:35.677Z","repository_id":12697088,"created_at":"2025-08-18T02:31:35.678Z","updated_at":"2025-08-18T02:31:35.678Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29609524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["jsqubits","quantum-computing"],"created_at":"2025-10-22T16:49:40.031Z","updated_at":"2026-02-19T09:04:35.110Z","avatar_url":"https://github.com/davidbkemp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Status: Inactive](https://img.shields.io/badge/status-inactive-red)\n\n# animatedQubits.js\n\n\u003cimg src=\"https://davidbkemp.github.io/animated-qubits/animated-qubits.png\" height=\"180\"\u003e\n\nJavaScript library for animating quantum computations.\n\nTo see an example of it in use, see the [Quantum Gate Playground](https://davidbkemp.github.io/quantum-gate-playground/) and the [Animation of Grover's Quantum Search Algorithm](https://davidbkemp.github.io/animated-qubits/grover.html).\n\nYou may also be interested in [An Interactive Introduction To Quantum Computing](https://davidbkemp.github.io/QuantumComputingArticle/) where I use animatedQubits.js to illustrate quantum computing concepts.\n\nHome page:  https://davidbkemp.github.io/animated-qubits\n\nUsage\n-----\n\nInclude animatedQubits.min.js and its dependencies in your web page. Possibly the easiest way to do this is to use [bower](https://bower.io/):\n\n    $ bower install animated-qubits\n\nYou should find animatedQubits.min.js and its dependencies installed in bower_components, and so you can include them as follows:\n\n    \u003cscript src=\"bower_components/animated-qubits/animatedQubits.min.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n    \u003cscript src=\"bower_components/d3/d3.min.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n    \u003cscript src=\"bower_components/d3-measure-text/lib/d3-measure-text.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n    \u003cscript src=\"bower_components/d3-transform/src/d3-transform.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n    \u003cscript src=\"bower_components/jsqubits/lib/jsqubits.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n    \u003cscript src=\"bower_components/q/q.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n    \u003cscript src=\"bower_components/lodash/dist/lodash.min.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\n\nAdd an svg element to the page:\n\n    \u003csvg id=\"mySvg\"\u003e\u003c/svg\u003e\n\n\nCreate a jsqubits object, pass it to the animatedQubits function to create an animatedQubits object, and ask it to display itself in the svg element (see also https://davidbkemp.github.io/jsqubits/ )\n\n    var qstate = jsqubits(\"|101\u003e\").hadamard(0).t(0);\n    var animation = animatedQubits(qstate, {maxRadius: 50});\n    var svgElement = document.getElementById(\"mySvg\");\n    \n    animation.display(svgElement);\n    \n    var naturalDimensions = animation.getNaturalDimensions();\n    \n    svgElement.setAttribute(\"height\", naturalDimensions.height);\n    svgElement.setAttribute(\"width\", naturalDimensions.width);\n\nStyle the quantum state amplitude discs using css:\n\n    .animatedQubitsAmplitudeCircle {\n        fill: hsla(195, 53%, 60%, 0.5);\n    }\n    \n    .animatedQubitsPhaseArrow {\n        stroke: red;\n        stroke-width: 2px;\n    }\n    \n    .animatedQubitsPhaseArrowEnd {\n        fill: red;\n    }\n\n\nAnimate an operation\n\n    animation.applyOperation(function hadamardAll(qstate) {\n        return qstate.hadamard(jsqubits.ALL);\n    }).then(function onSuccess(newQState) {\n        // Invoked asynchronously when the animation successfully completes\n    }).fail(function (msg) {\n        // Invoked asynchronously if an error occurs.\n        alert(msg);\n    });\n\nMeasure qubits 0 and 2 (where qubit 0 is the least significant i.e. right-most qubit):\n\n    animation.measure([0, 2])\n        .then(function onSuccess(newQState) {\n        // Invoked asynchronously when the animation successfully completes\n    }).fail(function (msg) {\n        // Invoked asynchronously if an error occurs.\n        alert(msg);\n    });\n\nThe applyOperation() and measure() methods return \"promise\" objects\nwith then() and fail() methods that take callbacks that get invoked upon\ncompletion of the animation\n(See https://promises-aplus.github.io/promises-spec/ ).\nThese promises will pass on the resultant QState object.\nSee the examples to see how this can be used.\n\nDevelopment\n-----------\n\nTo run specs and validate the JavaScript and create animatedQubits.min.js:\n\n    npm run build\n\nLicense\n-------\n\nThe MIT License (MIT)\n\nCopyright (c) 2013-2014 David Kemp\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbkemp%2Fanimated-qubits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidbkemp%2Fanimated-qubits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbkemp%2Fanimated-qubits/lists"}