pytket-qir


Namepytket-qir JSON
Version 0.20.0 PyPI version JSON
download
home_pageNone
SummaryExtension for pytket, providing functions for conversion into to qir
upload_time2025-02-04 11:23:07
maintainerNone
docs_urlNone
authorTKET development team
requires_python>=3.10
licenseApache 2
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pytket-qir -- Pytket QIR Extension

[![Slack](https://img.shields.io/badge/Slack-4A154B?style=for-the-badge&logo=slack&logoColor=white)](https://tketusers.slack.com/join/shared_invite/zt-18qmsamj9-UqQFVdkRzxnXCcKtcarLRA#)
[![Stack Exchange](https://img.shields.io/badge/StackExchange-%23ffffff.svg?style=for-the-badge&logo=StackExchange)](https://quantumcomputing.stackexchange.com/tags/pytket)

This repository contains the pytket-qir extension, using Quantinuum's
[pytket](https://tket.quantinuum.com/api-docs/index.html) quantum SDK.

[Pytket](https://tket.quantinuum.com/api-docs/index.html) 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](https://tket.quantinuum.com/extensions/pytket-qir/)

## Getting started

`pytket-qir` is available for Python 3.10, 3.11 and 3.12, 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](https://github.com/CQCL/pytket-qir/issues).

There 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.

## 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
[black](https://black.readthedocs.io/en/stable/), with default options. This is
checked on the CI.

#### Type annotation

On the CI, [mypy](https://mypy.readthedocs.io/en/stable/) 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](https://github.com/astral-sh/ruff) and [pylint](https://pypi.org/project/pylint/)
on the CI to check compliance with a set of style requirements (listed in `ruff.toml` and `.pylintrc`).
You should run `pylint` 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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pytket-qir",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "TKET development team",
    "author_email": "tket-support@quantinuum.com",
    "download_url": null,
    "platform": null,
    "description": "# pytket-qir -- Pytket QIR Extension\n\n[![Slack](https://img.shields.io/badge/Slack-4A154B?style=for-the-badge&logo=slack&logoColor=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&logo=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 and 3.12, 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[black](https://black.readthedocs.io/en/stable/), 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) and [pylint](https://pypi.org/project/pylint/)\non the CI to check compliance with a set of style requirements (listed in `ruff.toml` and `.pylintrc`).\nYou should run `pylint` 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",
    "bugtrack_url": null,
    "license": "Apache 2",
    "summary": "Extension for pytket, providing functions for conversion into to qir",
    "version": "0.20.0",
    "project_urls": {
        "Documentation": "https://tket.quantinuum.com/extensions/pytket-qir/index.html",
        "Source": "https://github.com/CQCL/pytket-qir",
        "Tracker": "https://github.com/CQCL/pytket-qir/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1ef878b03c964b9e561ff5a50b86b936928a2ba3df31b52312ecbe2ab8b70991",
                "md5": "da462a3d00abde60b0c9577aa6d685e1",
                "sha256": "429c0339bb8693208f427ada72207db442431302d54bdfd24d577a53e2e120fa"
            },
            "downloads": -1,
            "filename": "pytket_qir-0.20.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "da462a3d00abde60b0c9577aa6d685e1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 31377,
            "upload_time": "2025-02-04T11:23:07",
            "upload_time_iso_8601": "2025-02-04T11:23:07.393524Z",
            "url": "https://files.pythonhosted.org/packages/1e/f8/78b03c964b9e561ff5a50b86b936928a2ba3df31b52312ecbe2ab8b70991/pytket_qir-0.20.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-04 11:23:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CQCL",
    "github_project": "pytket-qir",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pytket-qir"
}
        
Elapsed time: 0.41388s