{"id":19876686,"url":"https://github.com/dirktoewe/quippy","last_synced_at":"2026-06-12T15:31:37.975Z","repository":{"id":176082588,"uuid":"220415405","full_name":"DirkToewe/QuIPPy","owner":"DirkToewe","description":"A minimalistic quantum circuit simulator for Python.","archived":false,"fork":false,"pushed_at":"2019-11-08T17:07:53.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-20T20:29:54.291Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DirkToewe.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-08T07:53:51.000Z","updated_at":"2024-10-17T01:34:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"c5986e8a-3e7d-469c-95b5-8ddebc12f479","html_url":"https://github.com/DirkToewe/QuIPPy","commit_stats":null,"previous_names":["dirktoewe/quippy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DirkToewe/QuIPPy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkToewe%2FQuIPPy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkToewe%2FQuIPPy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkToewe%2FQuIPPy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkToewe%2FQuIPPy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DirkToewe","download_url":"https://codeload.github.com/DirkToewe/QuIPPy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DirkToewe%2FQuIPPy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34251774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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":[],"created_at":"2024-11-12T16:33:57.942Z","updated_at":"2026-06-12T15:31:37.952Z","avatar_url":"https://github.com/DirkToewe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Motivation\nThere is a wide variety of high-performance quantum circuit simulators available.\nDue to their focus on performance, they are implemented in C++ and/or (GPU)\nparallelized. This makes the source code hard to read and understand. The math\nbehind simulating quantum circuits however is very helpful in understanding\nthe power of quantum computing.\n\nQuIPPy is a minimalistic Python implementation of a quantum circuit simulator.\nThe focus of QuIPPy is not on performance but on simplicity. Counting comments,\nthe key component of QuIPPy, the `QMem` class, is only 310 lines of code long.\n\nQuIPPy was written to improve the authors understanding of quantum computing.\nIts source code is released in the hopes that it helps others understand\nquantum computing better as well.\n\n# Usage\nThe following example brings two quantum bits into an entangled state using a\nsimple quantum circuit made up of a Hadamard gate followed by a controlled not\n(CNOT) gate.\n\n```py\nfrom quippy import QMem\nfrom quippy.gates import H,CNOT\n\n#              ┌───┐\n# |1\u003e =: in1 ──┤ H ├──●─── out1\n#              └───┘  │\n# |0\u003e =: in0 ─────────⊕─── out0\n\nin0 = 0\nin1 = 1\n\nqMem = QMem( bits = [in0,in1] )\nqMem.apply_gate([1], H)\nqMem.apply_gate([0,1], CNOT)\n\nprint('entangled state:', qMem.qstate.real)\n\nout1,out0 = qMem.measure([1,0])\nprint( 'Measurement: |{:d}{:d}〉'.format(out1,out0) ) # \u003c- either |00〉or |11〉\n\nprint('collapsed state:', qMem.qstate.real) # \u003c- measurement collapses quantum state\n```\n\nIn the [test cases](./tests/q_mem_tests.py), more usage examples can be found, most of them\nbased on examples from the book `Quantum Computation and Quantum Information`\nby Michael A. Nielsen and Isaac L. Chuang.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirktoewe%2Fquippy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirktoewe%2Fquippy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirktoewe%2Fquippy/lists"}