Skip to content

Commit a3aee94

Browse files
mrossinektimmintam
andauthored
Prepare the 0.1 Release (#72)
* docs: update installation instructions The 0.1 release will be published to PyPI, simplifying the installation instructions. * meta: bump version number * Remove deprecated TODOs * ci: add code publishing workflow --------- Co-authored-by: Timothée Dao <[email protected]>
1 parent 1987e12 commit a3aee94

File tree

6 files changed

+74
-13
lines changed

6 files changed

+74
-13
lines changed

.github/workflows/publish_code.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish release
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+.[0-9]+*"
7+
8+
jobs:
9+
10+
pypi:
11+
name: pypi
12+
runs-on: ubuntu-latest
13+
needs: github
14+
steps:
15+
- name: Checkout tag
16+
uses: actions/checkout@v4
17+
with:
18+
ref: ${{ github.ref_name }}
19+
- name: Install hatch
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install hatch
23+
- name: Build using hatch
24+
run: |
25+
hatch build
26+
- name: Publish release
27+
env:
28+
HATCH_INDEX_REPO: https://upload.pypi.org/legacy/
29+
HATCH_INDEX_USER: __token__
30+
HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }}
31+
run: |
32+
hatch publish

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,21 @@ footing (see `povm_toolbox.quantum_info`).
1616

1717
## Installation
1818

19+
Make sure that you have the correct Python environment active, into which you
20+
want to install this code, before running the below.
21+
1922
You can install this code via pip:
2023
```
24+
pip install povm-toolbox
25+
```
26+
27+
Alternatively, you can install it from source:
28+
```
2129
git clone [email protected]:qiskit-community/povm-toolbox.git
2230
cd povm-toolbox
23-
pip install .
31+
pip install -e .
2432
```
25-
26-
Make sure that you have the correct Python environment active, into which you
27-
want to install this code, before running the above.
33+
This performs an editable install to simplify code development.
2834

2935
If you intend to develop on this code, you should consider reading the
3036
[contributing guide](CONTRIBUTING.md).

docs/index.rst

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,28 @@ In this documentation you can find a number of resources including:
2525
Installation
2626
------------
2727

28+
Make sure that you have the correct Python environment active, into which you
29+
want to install this code, before running the below.
30+
2831
You can install this code via pip:
2932

33+
.. code-block:: bash
34+
35+
pip install povm-toolbox
36+
37+
Alternatively, you can install it from source:
38+
3039
.. code-block:: bash
3140
3241
git clone [email protected]:qiskit-community/povm-toolbox.git
3342
cd povm-toolbox
34-
pip install .
43+
pip install -e .
44+
45+
This performs an editable install to simplify code development.
46+
47+
If you intend to develop on this code, you should consider reading the
48+
`contributing guide <https://github.com/qiskit-community/povm-toolbox/blob/main/CONTRIBUTING.md>`_.
3549

36-
Make sure that you have the correct Python environment active, into which you
37-
want to install this code, before running the above.
3850

3951
Citation
4052
--------

povm_toolbox/library/povm_implementation.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,6 @@ def to_sampler_pub(
137137
:class:`.POVMImplementation` object itself. The metadata should contain all the
138138
information necessary to extract the POVM outcomes out of raw bitstrings.
139139
"""
140-
# TODO: figure out if it would be better to pass these arguments as a
141-
# ``SamplerPubLike`` object or even as a ``SamplerPub`` object.
142-
143-
# TODO: is it the right place to coerce the ``SamplerPub`` ? Or should
144-
# just return a ``SamplerPubLike`` object that the SamplerV2 will coerce?
145140

146141
def compose_circuits(self, circuit: QuantumCircuit) -> QuantumCircuit:
147142
"""Compose the circuit to sample from, with the measurement circuit.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "povm_toolbox"
7-
version = "0.0.0"
7+
version = "0.1.0"
88
readme = "README.md"
99
license = {file = "LICENSE.txt"}
1010

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
prelude: >
3+
.. note::
4+
Starting with this release, this project will follow
5+
`semantic versioning <https://semver.org/>`_.
6+
7+
This is a toolbox for working with positive operator-valued measures (POVMs).
8+
It enables users to use POVMs for sampling the state of quantum circuits (see
9+
also :mod:`povm_toolbox.sampler`) and compute expectation values of any
10+
observable of interest (see also :mod:`povm_toolbox.post_processor`).
11+
The toolbox includes a library of pre-defined POVMs (see
12+
:mod:`povm_toolbox.library`) which provide ready-to-go POVM circuit definitions.
13+
You can also implement your own POVM circuits by following the provided
14+
interface.
15+
Additionally, you can work with POVMs on a quantum-informational theoretical
16+
footing (see :mod:`povm_toolbox.quantum_info`).

0 commit comments

Comments
 (0)