Skip to content

Commit a41e3e5

Browse files
lpawelaMartinBesedaplewandowska777
authored
Full Fourier certification support, transfer to Qiskit 1.3.1 and many bugfixes (#49) (#50)
* fork to certification * jupyter-notebook with usage pyqbench as library using certification scheme * Update README.md * consideretion of plotting functionalities * fix benchmark asynch * fix job retrieval * probability distribution m3 * [WIP] Getting qbench/fourier/experiment_runner.py working with current (2024) package versions. * [WIP] [FIX] Fixing qbench/fourier/experiment_runner.py to be compatible with current (2024) package versions. * [FIX] Fixed packages imports for qbench/fourier_cerification/experiment_runner.py. * [FIX] Added qiskit-ibm-runtime dependency. * [NEW] Added Conda env file. * [FIX] [WIP] Fixing the code structure, so that 'qbench' can be used as an imported package from an arbitrary location. * [WIP] [FIX] Fixed minor problems with fourier_certification package to enable 'qbench' being used as a package from an arbitrary location. * [FIX] YAML env updated. * [WIP] Added a possibility of using a local Aer Simulator for Fourier certification problems through CLI. The implementation is very simplistic for now, not allowing passing of any additional parameters. * [FIX] Cleansed the code from unnecessary comments. * [ENH] Added 'res.yml' to .gitignore. * [ENH] Added 'brisbane' and 'kyiv' IBM backend configurations. * [FIX] Added missing circuit transpilation and backend specification by name. * [ENH] Added frequent output filenames to gitignore. * [FIX] Fixed obtaining of job information by its ID. * [FIX] Added 'pydantic.v1' package to environment.yml and pyproject.yml. * [FIX] Fix Conda environment YAML file and dependencies in pyproject.toml. * [ENH] Added two examples for discrimination. * [FIX] Fixed an obsolete Qiskit method names. Added a necessary circuit transpilation for the Fourier discrimination. * [FIX] Fixed incorrect parameters passed to retrieve_jobs(). * [FIX] Increased the number of shots to 100 in the direct sum discrimination example. * [FIX] Fixed Hadamard example. * [ENH] Removed an obsolete docstring. * [FIX] [WIP] Fix non-working imports and account logging. * [FIX] Fixed Hadamard example * [FIX] Fixed job name retrieval. * [WIP] [FIX] Fixing automated tests. ASW and Rigetti support is currently being limited. * [FIX] Fixed problems with some automated test providing ValidationError import from pydantic.v1 instead of the current (V2) pydantic. * [FIX] Added missing examples. * [WIP] [FIX] Fixed some automated tests. * [WIP] [FIX] Fixed multiple automated tests. * new configuration * hadamard experiments * hadamard experiments * change name of functions * name of functions * name of functions * changes name function * hadamard discrimination and certification experiment * certification Hadamard experiment * hadamard * [FIX] Fixed merge with updates from Paulina Lewandowska. * [WIP] [FIX] Fourier certification fixed for the new version of qiskit_ibm_runtime. * [ENH] Added a new version of Conda environment. * [FIX] Removed 'pyqbench' from dependencies in environment.yml. * [FIX] Fixed obtaining of Fourier certification job status. * [FIX] Fixed obtaining discrimination job statuses. * [FIX] Added cast from Enum value to 'str'. * [FIX] Fixed 'resolve' functionality. * [ENH] Ignoring *.yml and *.csv files by Git. * [FIX] Fixed 'resolve' for Fourier discrimination. * [FIX] Fixed problems with Jupyter notebooks. Fixed bad function name in direct_sum module. Added missing transpilation, where needed. * [FIX] Fixed Jupyter notebooks and obtaining counts from qiskit_ibm_runtime primitives. * [WIP] [FIX] Trying to fix the method naming. * [FIX] Fixed incorrect import in Fourier discrimination. * [WIP] [FIX] Fixed incorrectly called certification method. * [FIX] Fixed certification postselection benchmarking. * [FIX] Update Conda env. * [FIX] Fixed typo. * [FIX] Added an exact (upper bound) solution to the discrimination experiments in 'tabulate'. * [FIX] Removed 'name:u' label from the certification 'resolve' output. * [FIX] Fixed the statistical significance printed when running certification benchmark. * [DEL] Removed some unnecessary backends from 'examples'. * [DEL] Deleted results from 'examples'. * [ENH] Python version supported is now fixed at 3.11. * [ENH] Added support for IQP_API_TOKEN OS variable. * [ENH] Renamed a function to 'add_fourier_certification_parser()'. * [ENH] Removed commented code. * [ENH] [FIX] Moved the class FourierComponents into a separate components.py module in the certification. Fixed 'tabulate' for certification. * [FIX] Changed Python version in run_quality_checks to ==3.11. Also fixed the typo in the name of the job 'run_quality_checks'. * [WIP] [FIX] Fixing automatic tests... * [WIP] Fixing CI tests. Removed AWS-dependent tests from PR CI workflow. * [FIX] Changed version of Python to 3.11. * [WIP] [FIX] Fixing automated tests... * [WIP] [ENH] Removed some automated tests requiring AWS credentials from the PR CI workflow. * [WIP] Deactivated tests dependent on AerSim, which will need reworking of 'status' and 'resolve' functionalities. * [WIP] [FIX] Trying to fix automated tests for Python3.11.*. * [FIX] Re-sorted imports via "isort". * [FIX] Re-formatted the code with "black". * [FIX] Re-formatted import with "isort". * [FIX] Re-formatted files with isort, black and flake8. * [WIP] [FIX] Fixing the code according to MyPy * [WIP] [FIX] Fixed one type 'mypy' error. * [FIX] Fixed mypy errors. * [FIX] Fixed missing dependency in pyproject.toml. * [FIX] Added QISKIT_IBM_TOKEN reading from GitHub secrets for automated tests. * [WIP] [FIX] Fixing the GitHub workflow not taking the API key... * [WIP] [FIX] Limited qiskit and qiskit-ibm-runtime versions. * [WIP] [FIX] Defined reading of QISKIT_IBM_TOKEN variable in github workflow at the top level of quality_checks.yml file. * [WIP] Re-defined QISKIT_IBM_TOKEN for github workflow. * [WIP] Trying to automatize PR tests. * [WIP] Reverted some changes connected to QISKIT_IBM_TOKEN. * [WIP] Fixing CI... * [WIP] Fixing CI * [WIP] Fixing CI... * [WIP] [FIX] Fixed indentation problem with quality_checks.yml. * [FIX] [WIP] Getting CI working... Added missing checkout. --------- Co-authored-by: Martin Beseda <[email protected]> Co-authored-by: plewandowska <[email protected]> Co-authored-by: plewandowska777 <[email protected]>
1 parent 880196d commit a41e3e5

File tree

71 files changed

+3237
-724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+3237
-724
lines changed

.github/workflows/quality_checks.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,31 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
python-versions: ["3.8", "3.9", "3.10"]
10+
python-versions: ["3.11"]
1111
steps:
12-
- uses: aws-actions/configure-aws-credentials@v1
13-
with:
14-
aws-region: eu-west-2
15-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
16-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
1712
- uses: actions/checkout@v2
1813
- name: Set up Python
1914
uses: actions/setup-python@v2
2015
with:
21-
python-version: ${{ matrix.python-version }}
16+
python-version: 3.11
2217
- name: Install dependencies and the package
2318
run: |
2419
python -m pip install --upgrade pip
25-
pip install .[test]
20+
pip install -v .[test]
2621
- name: Run unit tests
27-
run: pytest --cov=qbench --cov-report=xml
22+
run: pytest --cov=qbench --cov-report=xml -k 'not awscreds and not aersim'
23+
env:
24+
QISKIT_IBM_TOKEN: ${{ secrets.QISKIT_IBM_TOKEN }}
2825
- name: Upload coverage reports to Codecov
2926
uses: codecov/codecov-action@v3
3027

31-
run_quality_cheks:
28+
run_quality_checks:
3229
runs-on: ubuntu-latest
3330
steps:
3431
- name: Set up Python
3532
uses: actions/setup-python@v2
3633
with:
37-
python-version: 3.9
34+
python-version: 3.11
3835
- uses: actions/checkout@v2
3936
- name: Install dependencies and the package
4037
run: |

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,12 @@ dmypy.json
130130

131131
# PyCharm files
132132
.idea/**
133+
134+
# Generated files
135+
res.yml
136+
resolved.yml
137+
results.yml
138+
resolved.csv
139+
results.csv
140+
*.yml
141+
*.csv

.pre-commit-config.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
default_language_version:
2-
python: python3.9
2+
python: python3.11
33

44
default_stages: [commit, push]
55

@@ -15,8 +15,7 @@ repos:
1515
hooks:
1616
- id: black
1717
args: ["--check"]
18-
language_version: python3.9
19-
18+
language_version: python3.11
2019
- repo: https://github.com/pycqa/flake8
2120
rev: 6.0.0
2221
hooks:

Hadamard example.ipynb

Lines changed: 0 additions & 196 deletions
This file was deleted.

0 commit comments

Comments
 (0)