qiskit-community / povm-toolbox

A toolbox for the implementation of positive operator-valued measures (POVMs).
https://qiskit-community.github.io/povm-toolbox/
Apache License 2.0
6 stars 0 forks source link

Enable returning individual samples #36

Closed LaurinFischer closed 3 weeks ago

LaurinFischer commented 3 weeks ago

This PR implements functionality to optionally return the POVM measurements as individual samples rather than counts dictionaries, see #33.

Essentially, the abstract method _counter of POVMImplementation is replaced by a new method _povm_outcomes that returns a list of samples instead of a counts dictionary. Similarly, the get_counts_from_raw method is renamed to get_povm_outcomes_from_raw and has a boolean flag that determines whether to return samples or counts.

A small note on this has been added to the getting_started.ipynb tutorial.

mrossinek commented 3 weeks ago

And to fix the failing CI, you can run tox -e style from the root of your local clone to try and fix this automatically. tox -e lint will tell you if it got everything.