semvec/pypi-packages huggingface dataset:
scipion-em-kiharalab 1.1.2
Scipion plugin in order to use ther kiharalab software
Keywords: scipion kiharalab scipion-3.0 EM

.. |organization| replace:: scipion-em
.. |repository| replace:: scipion-em-kiharalab

========================================
Kihara Lab plugin
========================================
This is a **Scipion** plugin that offers different `Kihara Lab tools <https://kiharalab.org/>`_.
These tools will make it possible to carry out different functions for working with electron density maps.
The code involving these functionalities can be found at https://github.com/kiharalab.

Therefore, this plugin allows to use programs from the DAQ software suite
within the Scipion framework.

========================================
Wiki
========================================
All the information regarding installation, protocols, changelog and others, can be found in the `Wiki <https://github.com/scipion-em/scipion-em-kiharalab/wiki>`_.
pytket-qirpass 0.10.0
Module for optimizing QIR using pytket.

# 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 pytket_qirpass import apply_qirpass
from pytket.circuit import OpType
from pytket.passes import FullPeepholeOptimise

qir_out = apply_qirpass(
    qir_bitcode=qir_in,
    comp_pass=FullPeepholeOptimise(allow_swaps=False),
    target_1q_gates={OpType.Rx, OpType.Rz},
    target_2q_gates={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 pytket_qirpass import qir_to_pytket

circ = qir_to_pytket(qir_bitcode=qir_in)
```

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.