https://github.com/cqcl/pytket-iqm
pytket-iqm, extensions for pytket quantum SDK
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 (13.1%) to scientific vocabulary
Repository
pytket-iqm, extensions for pytket quantum SDK
Basic Info
- Host: GitHub
- Owner: CQCL
- License: apache-2.0
- Language: Python
- Default Branch: main
- Size: 6.53 MB
Statistics
- Stars: 4
- Watchers: 8
- Forks: 5
- Open Issues: 4
- Releases: 14
Metadata Files
README.md
pytket-iqm
Pytket is a python module providing an extensive set of tools for compiling and executing quantum circuits.
pytket-iqm is an extension to pytket that allows pytket circuits to be
executed on IQM's quantum devices and simulators.
Some useful links: - API Documentation
Getting started
pytket-iqm is available for Python 3.10, 3.11 and 3.12, on Linux, macOS
and Windows. To install, run:
shell
pip install pytket-iqm
This will install pytket if it isn't already installed, and add new classes
and methods into the pytket.extensions namespace.
API documentation is available here.
Under the hood, pytket-iqm uses iqm-client to interact with the devices. See
the IQM Client documentation and
Pytket documentation for more info.
To use the integration, initialise an IQMBackend, construct a Pytket circuit,
compile it and run. Here is a small example of running a GHZ state circuit:
```python from pytket.extensions.iqm import IQMBackend from pytket.circuit import Circuit
backend = IQMBackend(device="garnet", apitoken="APITOKEN")
circuit = Circuit(3, 3) circuit.H(0) circuit.CX(0, 1) circuit.CX(0, 2) circuit.measureall() compiledcircuit = backend.getcompiledcircuit(circuit)
result = backend.runcircuit(compiledcircuit, nshots=100) print(result.getshots()) ```
Note that the API token can be provided explicitly as an argument when
constructing the backend; alternatively it can be stored in pytket config (see
IQMConfig.set_iqm_config()); or it can be stored in a file whose location is
given by the environment variable IQM_TOKENS_FILE.
The IQM Client documentation includes the set of currently supported
instructions.
pytket-iqm retrieves the set from the IQM backend during the initialisation;
then get_compiled_circuit() takes care of compiling the circuit into the
form suitable to run on the backend.
During the backend initialisation, pytket-iqm also retrieves the names of
physical qubits and qubit connectivity.
(Note: At the moment IQM does not provide a quantum computing service open to the general public. Please contact their sales team to set up your access to an IQM quantum computer.)
Bugs and feature requests
Please file bugs and feature requests on the GitHub issue tracker.
Development
To install an extension in editable mode, simply change to its subdirectory
within the modules directory, and run:
shell
pip install -e .
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, 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 modules/mypy-check
(passing as a single argument the root directory of the module to test). The
script requires mypy 0.800 or above.
Linting
We use pylint on the CI to check compliance
with a set of style requirements (listed in .pylintrc). You should run
pylint over any changed files before submitting a PR, to catch any issues.
Tests
To run the tests:
shell
cd tests
pip install -r test-requirements.txt
pytest
By default, the remote tests, which run against the real backend server, are
skipped. To enable them, set the environment variable
PYTKET_RUN_REMOTE_TESTS=1 and make sure you have your API token stored either
in pytket config or in a file whose location is given by the environment
variable IQM_TOKENS_FILE.
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
- Website: http://www.cambridgequantum.com
- Repositories: 48
- Profile: https://github.com/CQCL
Quantum Software and Technologies
GitHub Events
Total
- Create event: 23
- Release event: 1
- Issues event: 6
- Watch event: 2
- Delete event: 14
- Issue comment event: 11
- Push event: 23
- Pull request review comment event: 3
- Pull request review event: 16
- Pull request event: 33
- Fork event: 1
Last Year
- Create event: 23
- Release event: 1
- Issues event: 6
- Watch event: 2
- Delete event: 14
- Issue comment event: 11
- Push event: 23
- Pull request review comment event: 3
- Pull request review event: 16
- Pull request event: 33
- Fork event: 1
Committers
Last synced: over 3 years ago
All Time
- Total Commits: 33
- Total Committers: 6
- Avg Commits per committer: 5.5
- Development Distribution Score (DDS): 0.394
Top Committers
| Name | Commits | |
|---|---|---|
| cqc-melf | 7****f@u****m | 20 |
| melf | c****c@m****e | 7 |
| Alec Edgington | 5****c@u****m | 3 |
| CalMacCQ | 9****Q@u****m | 1 |
| Fernando Betanzo Sanchez | f****o@g****m | 1 |
| Rakhim Davletkaliyev | r****m@r****g | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 15
- Total pull requests: 166
- Average time to close issues: about 2 months
- Average time to close pull requests: 5 days
- Total issue authors: 4
- Total pull request authors: 9
- Average comments per issue: 0.73
- Average comments per pull request: 0.5
- Merged pull requests: 129
- Bot issues: 0
- Bot pull requests: 40
Past Year
- Issues: 4
- Pull requests: 38
- Average time to close issues: N/A
- Average time to close pull requests: 15 days
- Issue authors: 2
- Pull request authors: 4
- Average comments per issue: 0.0
- Average comments per pull request: 0.34
- Merged pull requests: 23
- Bot issues: 0
- Bot pull requests: 11
Top Authors
Issue Authors
- cqc-melf (7)
- cqc-alec (6)
- kukushechkin (1)
- JMuff22 (1)
Pull Request Authors
- cqc-melf (87)
- dependabot[bot] (40)
- cqc-alec (28)
- CalMacCQ (4)
- sjdilkes (2)
- freetonik (2)
- ferbetanzo (1)
- JMuff22 (1)
- ollityrkko (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 624 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 16
- Total maintainers: 2
pypi.org: pytket-iqm
Extension for pytket, providing access to IQM backends
- Documentation: https://docs.quantinuum.com/tket/extensions/pytket-iqm/index.html
- License: Apache 2
-
Latest release: 0.16.0
published over 1 year ago
Rankings
Dependencies
- sphinx *
- sphinx_rtd_theme *
- pytket *
- hypothesis * test
- pytest * test
- pytest-timeout * test
- requests_mock * test
- types-requests * test
- actions/checkout v3 composite
- actions/deploy-pages v1 composite
- actions/download-artifact v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- actions/upload-pages-artifact v1 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- atlassian/gajira-create v3.0.1 composite
- atlassian/gajira-login v3.0.1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite