https://github.com/cqcl/pytket-qir

Public repo for the pytket-qir package

https://github.com/cqcl/pytket-qir

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.8%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Public repo for the pytket-qir package

Basic Info
  • Host: GitHub
  • Owner: CQCL
  • License: apache-2.0
  • Language: LLVM
  • Default Branch: main
  • Size: 1.8 MB
Statistics
  • Stars: 11
  • Watchers: 10
  • Forks: 3
  • Open Issues: 8
  • Releases: 59
Created almost 4 years ago · Last pushed 11 months ago
Metadata Files
Readme License Codeowners

README.md

pytket-qir -- Pytket QIR Extension

Slack Stack Exchange

This repository contains the pytket-qir extension, using Quantinuum's pytket quantum SDK.

Pytket is a python module for interfacing with tket, a quantum computing toolkit and optimising compiler developed by Quantinuum.

pytket-qir is an extension to pytket that allows pytket circuits to be converted to qir.

Some useful links: - API Documentation

Getting started

pytket-qir is available for Python 3.10, 3.11, 3.12 and 3.13, on Linux, MacOS and Windows. To install, run:

shell pip install pytket-qir

This will install pytket if it isn't already installed, and add new classes and methods into the pytket.extensions namespace.

Bugs, support and feature requests

Please file bugs and feature requests on the Github issue tracker.

There is also a Slack channel for discussion and support. Click here to join.

Development

First setup your virtual environment (or ignore if you already have it):

sh python -m venv .venv source .venv/bin/activate

Then install required dependencies:

sh pip install -U pip setuptools pip install build pre-commit pytest wheel mypy~=1.4 black~=23.7 pylint~=2.17 ruff==0.0.282 pre-commit install

Then install this extension in editable mode, simply change to this directory, and run:

shell pip install -e .

You could also use make targets such as:

sh make install # for installation make dev # for editable install make lint # run linters and formatters make tests # for running tests make build # for source and wheel distribution packages make clean # to clean up autogenerated files

Contributing

Pull requests are welcome. To make a PR, first fork the repo, make your proposed changes on the main branch, and open a PR from your fork. If it passes tests and is accepted after review, it will be merged in.

Code style

Formatting

All code should be formatted using ruff, with default options. This is checked on the CI.

Type annotation

On the CI, mypy is used as a static type checker and all submissions must pass its checks. You should therefore run mypy locally on any changed files before submitting a PR. Because of the way extension modules embed themselves into the pytket namespace this is a little complicated, but it should be sufficient to run the script ./mypy-check (passing as a single argument the root directory of the module to test).

Linting

We use ruff on the CI to check compliance with a set of style requirements (listed in ruff.toml). You should run ruff over any changed files before submitting a PR, to catch any issues.

An easy way to meet all formatting and linting requirements is to issue pre-commit run --all-files or make lint before sending a PR.

Tests

To run the tests:

  1. cd into the tests directory;
  2. ensure you have installed pytest, hypothesis, and any modules listed in the test-requirements.txt file (all via pip);
  3. run pytest.

When adding a new feature, please add a test for it. When fixing a bug, please add a test that demonstrates the fix.

Owner

  • Name: Cambridge Quantum
  • Login: CQCL
  • Kind: organization
  • Location: Cambridge, UK

Quantum Software and Technologies

GitHub Events

Total
  • Create event: 50
  • Issues event: 16
  • Release event: 12
  • Watch event: 5
  • Delete event: 3
  • Issue comment event: 17
  • Push event: 108
  • Pull request review event: 67
  • Pull request review comment event: 53
  • Pull request event: 77
  • Fork event: 2
Last Year
  • Create event: 50
  • Issues event: 16
  • Release event: 12
  • Watch event: 5
  • Delete event: 3
  • Issue comment event: 17
  • Push event: 108
  • Pull request review event: 67
  • Pull request review comment event: 53
  • Pull request event: 77
  • Fork event: 2

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 40
  • Total Committers: 2
  • Avg Commits per committer: 20.0
  • Development Distribution Score (DDS): 0.475
Top Committers
Name Email Commits
Roland-djee 9****e@u****m 21
Roland Guichard r****d@c****m 19
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 32
  • Total pull requests: 262
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 2 days
  • Total issue authors: 6
  • Total pull request authors: 10
  • Average comments per issue: 0.75
  • Average comments per pull request: 0.48
  • Merged pull requests: 223
  • Bot issues: 2
  • Bot pull requests: 32
Past Year
  • Issues: 14
  • Pull requests: 83
  • Average time to close issues: 14 days
  • Average time to close pull requests: about 10 hours
  • Issue authors: 4
  • Pull request authors: 5
  • Average comments per issue: 0.57
  • Average comments per pull request: 0.11
  • Merged pull requests: 73
  • Bot issues: 1
  • Bot pull requests: 5
Top Authors
Issue Authors
  • cqc-melf (12)
  • cqc-alec (10)
  • peter-campora (6)
  • Roland-djee (1)
  • dependabot[bot] (1)
  • irfankhan10 (1)
Pull Request Authors
  • cqc-melf (171)
  • cqc-alec (35)
  • dependabot[bot] (31)
  • Roland-djee (20)
  • qartik (2)
  • CalMacCQ (2)
  • sjdilkes (2)
  • jake-arkinstall (2)
  • doug-q (1)
  • isobelhooper (1)
Top Labels
Issue Labels
bug (1) dependencies (1) github_actions (1)
Pull Request Labels
dependencies (31) python (16) github_actions (13)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 12,318 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 0
  • Total versions: 63
  • Total maintainers: 2
pypi.org: pytket-qir

Extension for pytket, providing functions for conversion into to qir

  • Versions: 63
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 12,318 Last month
Rankings
Dependent packages count: 6.6%
Downloads: 23.0%
Average: 23.8%
Stargazers count: 28.2%
Forks count: 30.5%
Dependent repos count: 30.6%
Maintainers (2)
Last synced: 11 months ago

Dependencies

poetry.lock pypi
  • certifi 2022.6.15
  • cffi 1.15.1
  • charset-normalizer 2.1.0
  • cryptography 37.0.4
  • graphviz 0.20
  • idna 3.3
  • importlib-metadata 4.12.0
  • jeepney 0.8.0
  • jinja2 3.1.2
  • keyring 23.7.0
  • keyrings.alt 4.1.1
  • lark-parser 0.12.0
  • markupsafe 2.1.1
  • mpmath 1.2.1
  • nest-asyncio 1.5.5
  • networkx 2.8.5
  • numpy 1.23.1
  • pycparser 2.21
  • pyjwt 2.4.0
  • pyqir 0.4.2a1
  • pyqir-evaluator 0.5.0a1
  • pyqir-generator 0.5.0a1
  • pyqir-parser 0.5.0a1
  • pytket 1.5.0rc0
  • pywin32-ctypes 0.2.0
  • requests 2.28.1
  • scipy 1.8.1
  • secretstorage 3.3.2
  • sympy 1.10.1
  • types-pkg-resources 0.1.3
  • typing-extensions 4.3.0
  • urllib3 1.26.10
  • websockets 10.3
  • zipp 3.8.1
pyproject.toml pypi
  • keyring ^23.6.0
  • keyrings.alt ^4.1.0
  • nest-asyncio ^1.5.5
  • pyjwt ^2.4
  • pyqir ^0.4.2a1
  • python >=3.8,<3.11
  • pytket ^1.3.0rc1
  • requests ^2.28.0
  • websockets ^10.3
.github/workflows/lint.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/type.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite