{"id":13751517,"url":"https://github.com/dakk/qlasskit","last_synced_at":"2026-01-14T07:56:05.341Z","repository":{"id":196237710,"uuid":"695168027","full_name":"dakk/qlasskit","owner":"dakk","description":"A python-to-quantum compiler","archived":false,"fork":false,"pushed_at":"2025-12-12T10:24:44.000Z","size":11015,"stargazers_count":70,"open_issues_count":12,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-13T22:44:32.229Z","etag":null,"topics":["quantum","quantum-algorithms","quantum-annealing","quantum-computing","quantum-programming-language"],"latest_commit_sha":null,"homepage":"https://dakk.github.io/qlasskit/","language":"Python","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/dakk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"dakk","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-09-22T13:58:24.000Z","updated_at":"2025-12-12T10:22:15.000Z","dependencies_parsed_at":"2023-12-18T19:29:00.954Z","dependency_job_id":"4e10d7b2-e7ba-4063-a08d-33be0d015793","html_url":"https://github.com/dakk/qlasskit","commit_stats":null,"previous_names":["dakk/qlasskit"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/dakk/qlasskit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakk%2Fqlasskit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakk%2Fqlasskit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakk%2Fqlasskit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakk%2Fqlasskit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dakk","download_url":"https://codeload.github.com/dakk/qlasskit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dakk%2Fqlasskit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"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":["quantum","quantum-algorithms","quantum-annealing","quantum-computing","quantum-programming-language"],"created_at":"2024-08-03T09:00:47.235Z","updated_at":"2026-01-14T07:56:05.326Z","avatar_url":"https://github.com/dakk.png","language":"Python","funding_links":["https://github.com/sponsors/dakk"],"categories":["Community","Quantum compilers"],"sub_categories":[],"readme":"# Qlasskit\n\n![Logo](docs/source/_images/logo/header.png)\n\n[![Unitary Fund](https://img.shields.io/badge/supported_by-Unitary_Fund-ffff00.svg)](https://unitary.fund)\n![CI Status](https://github.com/dakk/qlasskit/actions/workflows/ci.yaml/badge.svg)\n![PyPI - Version](https://img.shields.io/pypi/v/qlasskit)\n![License: Apache 2.0](https://img.shields.io/badge/license-Apache_2.0-blue)\n[![Discord](https://img.shields.io/badge/qlasskit-Discord-yellow?logo=discord\u0026logoColor=f5f5f5)](https://discord.com/channels/764231928676089909/1210279373865754624)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/05acc06af76848028183a66448217d91)](https://app.codacy.com/gh/dakk/qlasskit/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![Downloads](https://static.pepy.tech/badge/qlasskit)](https://pepy.tech/project/qlasskit)\n\n\nQlasskit is a Python library that allows quantum developers to write classical algorithms in pure Python and translate them into unitary operators (gates) for use in quantum circuits, using boolean expressions as intermediate form.\n\nThis tool will be useful for any algorithm that relies on a 'blackbox' function and for describing the classical components of a quantum algorithm.\n\nQlasskit implements circuit / gate exporters for Qiskit, Cirq, Qasm, Sympy and Pennylane.\n\nQlasskit also support exporting to Binary Quadratic Models (bqm, ising and qubo) ready to be used in\nquantum annealers, ising machines, simulators, etc.\n\n\n![Transformations](docs/source/_images/trasformations/qlasskit_transformations.png)\n\n\n```bash\npip install qlasskit\n```\n\nFor a quickstart, read the _quickstart_ and _examples_ notebooks from the documentation: [https://dakk.github.io/qlasskit](https://dakk.github.io/qlasskit).\n\n```python\nfrom qlasskit import qlassf, Qint \n\n@qlassf\ndef h(k: Qint[4]) -\u003e bool:\n    h = True\n    for i in range(4):\n        h = h and k[i]\n    return h\n```\n\n\nQlasskit will take care of translating the function to boolean expressions, simplify them and\ntranslate to a quantum circuit.\n\n![Grover](docs/source/_images/h_circ.png)\n\nThen, we can use grover to find which h(k) returns True:\n\n```python\nfrom qlasskit.algorithms import Grover\n\nalgo = Grover(h, True)\nqc = algo.circuit().export(\"circuit\", \"qiskit\")\n```\n\nAnd that's the result:\n\n![Grover](docs/source/_images/grover_circ.png)\n\nQlasskit also offers type abstraction for encoding inputs and decoding results:\n\n```python\ncounts_readable = algo.decode_counts(counts)\nplot_histogram(counts_readable)\n```\n\n![Decoded counts](docs/source/_images/grover_decoded.png)\n\nYou can also use other functions inside a qlassf:\n\n```python\n@qlassf\ndef equal_8(n: Qint[4]) -\u003e bool:\n  return equal_8 == 8\n\n@qlassfa(defs=[equal_8])\ndef f(n: Qint[4]) -\u003e bool:\n  n = n+1 if equal_8(n) else n\n  return n\n```\n\nQlasskit supports complex data types, like tuples and fixed size lists:\n\n```python\n@qlassf\ndef f(a: Tuple[Qint[8], Qint[8]]) -\u003e Tuple[bool, bool]:\n  return a[0] == 42, a[1] == 0\n```\n\n```python\n@qlassf\ndef search(alist: Qlist[Qint[2], 4], to_search: Qint[2]):\n  for x in alist:\n    if x == to_search:\n      return True\n  return False\n```\n\n\nQlasskit function can be parameterized, and the parameter can be bind before compilation:\n\n```python\n@qlassf\ndef test(a: Parameter[bool], b: bool) -\u003e bool:\n    return a and b\n\nqf = test.bind(a=True)\n```\n\n\n## Contributing\n\nRead [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## License\n\nThis software is licensed with [Apache License 2.0](LICENSE).\n\n\n## Cite\n\n```\n@software{qlasskit2023,\n  author = {Davide Gessa},\n  title = {qlasskit: a python-to-quantum circuit compiler},\n  url = {https://github.com/dakk/qlasskit},\n  year = {2023},\n}\n```\n\n## About the author\n\nDavide Gessa (dakk)\n- \u003chttps://twitter.com/dagide\u003e\n- \u003chttps://mastodon.social/@dagide\u003e\n- \u003chttps://dakk.github.io/\u003e\n- \u003chttps://medium.com/@dakk\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdakk%2Fqlasskit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdakk%2Fqlasskit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdakk%2Fqlasskit/lists"}