{"id":22882487,"url":"https://github.com/cqcl/pytket-qir","last_synced_at":"2025-09-11T16:43:28.508Z","repository":{"id":47801546,"uuid":"515186998","full_name":"CQCL/pytket-qir","owner":"CQCL","description":"Public repo for the pytket-qir package","archived":false,"fork":false,"pushed_at":"2025-09-08T05:05:07.000Z","size":1888,"stargazers_count":11,"open_issues_count":9,"forks_count":3,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-09-10T05:58:50.153Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"LLVM","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/CQCL.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":".github/CODEOWNERS","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}},"created_at":"2022-07-18T13:03:34.000Z","updated_at":"2025-08-26T13:34:53.000Z","dependencies_parsed_at":"2023-02-17T22:01:21.386Z","dependency_job_id":"899640bc-a67b-4d2a-90da-63d6435e85c2","html_url":"https://github.com/CQCL/pytket-qir","commit_stats":{"total_commits":40,"total_committers":2,"mean_commits":20.0,"dds":0.475,"last_synced_commit":"78aede8460ff839dca3c070ff8c10f80f53aba74"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"purl":"pkg:github/CQCL/pytket-qir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fpytket-qir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fpytket-qir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fpytket-qir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fpytket-qir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CQCL","download_url":"https://codeload.github.com/CQCL/pytket-qir/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fpytket-qir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274672207,"owners_count":25328547,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"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-12-13T18:17:56.022Z","updated_at":"2025-09-11T16:43:28.337Z","avatar_url":"https://github.com/CQCL.png","language":"LLVM","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pytket-qir -- Pytket QIR Extension\n\n[![Slack](https://img.shields.io/badge/Slack-4A154B?style=for-the-badge\u0026logo=slack\u0026logoColor=white)](https://tketusers.slack.com/join/shared_invite/zt-18qmsamj9-UqQFVdkRzxnXCcKtcarLRA#)\n[![Stack Exchange](https://img.shields.io/badge/StackExchange-%23ffffff.svg?style=for-the-badge\u0026logo=StackExchange)](https://quantumcomputing.stackexchange.com/tags/pytket)\n\nThis repository contains the pytket-qir extension, using Quantinuum's\n[pytket](https://tket.quantinuum.com/api-docs/index.html) quantum SDK.\n\n[Pytket](https://tket.quantinuum.com/api-docs/index.html) is a python module for interfacing\nwith tket, a quantum computing toolkit and optimising compiler developed by Quantinuum.\n\n`pytket-qir` is an extension to `pytket` that allows `pytket` circuits to\nbe converted to qir.\n\nSome useful links:\n- [API Documentation](https://tket.quantinuum.com/extensions/pytket-qir/)\n\n## Getting started\n\n`pytket-qir` is available for Python 3.10, 3.11, 3.12 and 3.13, on Linux, MacOS\nand Windows. To install, run:\n\n```shell\npip install pytket-qir\n```\n\nThis will install `pytket` if it isn't already installed, and add new classes\nand methods into the `pytket.extensions` namespace.\n\n## Bugs, support and feature requests\n\nPlease file bugs and feature requests on the Github\n[issue tracker](https://github.com/CQCL/pytket-qir/issues).\n\nThere is also a Slack channel for discussion and support. Click [here](https://tketusers.slack.com/join/shared_invite/zt-18qmsamj9-UqQFVdkRzxnXCcKtcarLRA#/shared-invite/email) to join.\n\n## Development\n\nFirst setup your virtual environment (or ignore if you already have it):\n\n```sh\npython -m venv .venv\nsource .venv/bin/activate\n```\n\nThen install required dependencies:\n\n```sh\npip install -U pip setuptools\npip install build pre-commit pytest wheel mypy~=1.4 black~=23.7 pylint~=2.17 ruff==0.0.282\npre-commit install\n```\n\nThen install this extension in editable mode, simply change to this directory, and run:\n\n```shell\npip install -e .\n```\n\nYou could also use `make` targets such as:\n\n```sh\nmake install    # for installation\nmake dev        # for editable install\nmake lint       # run linters and formatters\nmake tests      # for running tests\nmake build      # for source and wheel distribution packages\nmake clean      # to clean up autogenerated files\n```\n\n## Contributing\n\nPull requests are welcome. To make a PR, first fork the repo, make your proposed\nchanges on the `main` branch, and open a PR from your fork. If it passes\ntests and is accepted after review, it will be merged in.\n\n### Code style\n\n#### Formatting\n\nAll code should be formatted using\n[ruff](https://docs.astral.sh/ruff/formatter/), with default options. This is\nchecked on the CI.\n\n#### Type annotation\n\nOn the CI, [mypy](https://mypy.readthedocs.io/en/stable/) is used as a static\ntype checker and all submissions must pass its checks. You should therefore run\n`mypy` locally on any changed files before submitting a PR. Because of the way\nextension modules embed themselves into the `pytket` namespace this is a little\ncomplicated, but it should be sufficient to run the script `./mypy-check`\n(passing as a single argument the root directory of the module to test).\n\n#### Linting\n\nWe use [ruff](https://github.com/astral-sh/ruff) on the CI to check compliance with a set of style requirements (listed in `ruff.toml`).\nYou should run `ruff` over any changed files before submitting a PR, to catch any issues.\n\nAn easy way to meet all formatting and linting requirements is to issue `pre-commit run --all-files`\nor `make lint` before sending a PR.\n\n### Tests\n\nTo run the tests:\n\n1. `cd` into the `tests` directory;\n2. ensure you have installed `pytest`, `hypothesis`, and any modules listed in\nthe `test-requirements.txt` file (all via `pip`);\n3. run `pytest`.\n\nWhen adding a new feature, please add a test for it. When fixing a bug, please\nadd a test that demonstrates the fix.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcqcl%2Fpytket-qir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcqcl%2Fpytket-qir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcqcl%2Fpytket-qir/lists"}