https://github.com/cqcl/pytket-qirpass
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
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (5.9%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: CQCL
- License: apache-2.0
- Language: LLVM
- Default Branch: main
- Size: 257 KB
Statistics
- Stars: 1
- Watchers: 8
- Forks: 2
- Open Issues: 1
- Releases: 2
Metadata Files
README.md
pytket-qirpass
This module provides a method to optimize QIR using pytket, and a method to convert QIR to pytket for simple circuits.
Installation
Python 3.10, 3.11, 3.12 or 3.13 is required.
To install from PyPI:
shell
pip install pytket-qirpass
Usage
Optimizing QIR with apply_qirpass
The function apply_qirpass takes as input
- some QIR bitcode
- a pytket compilation pass
- a target gateset
and outputs some new QIR bitcode, where the pass has been applied to the basic blocks in the input program, followed by a rebase to the target gateset.
For example:
```python from pytketqirpass import applyqirpass from pytket.circuit import OpType from pytket.passes import FullPeepholeOptimise
qirout = applyqirpass( qirbitcode=qirin, comppass=FullPeepholeOptimise(allowswaps=False), target1qgates={OpType.Rx, OpType.Rz}, target2qgates={OpType.ZZPhase}, ) ```
Both the input and the output are Python bytes objects.
Provided the pass preserves the circuit semantics, apply_qirpass preserves
the QIR semantics.
Converting QIR to pytket with qir_to_pytket
The function qir_to_pytket takes as input some QIR bitcode and outputs a
pytket circuit.
For example:
```python from pytketqirpass import qirto_pytket
circ = qirtopytket(qirbitcode=qirin) ```
The program represented by the bitcode must consist of a single basic block
comprised of quantum operations, i.e. __quantum__qis__* instructions; any
__quantum__rt__* instructions are accepted but ignored.
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
- Release event: 2
- Watch event: 1
- Issue comment event: 3
- Push event: 16
- Pull request review comment event: 6
- Pull request review event: 11
- Pull request event: 12
- Fork event: 1
- Create event: 8
Last Year
- Release event: 2
- Watch event: 1
- Issue comment event: 3
- Push event: 16
- Pull request review comment event: 6
- Pull request review event: 11
- Pull request event: 12
- Fork event: 1
- Create event: 8
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 1
- Total pull requests: 10
- Average time to close issues: N/A
- Average time to close pull requests: about 9 hours
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.8
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 10
- Average time to close issues: N/A
- Average time to close pull requests: about 9 hours
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.8
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- cqc-alec (1)
Pull Request Authors
- cqc-alec (10)
- cqc-melf (4)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 34 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 11
- Total maintainers: 2
pypi.org: pytket-qirpass
Module for optimizing QIR using pytket.
- Homepage: https://github.com/CQCL/pytket-qirpass
- Documentation: https://pytket-qirpass.readthedocs.io/
- License: Apache Software License
-
Latest release: 0.10.0
published over 1 year ago