Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
0a36453
add example for samplerv2 migration
David-Kreplin Oct 15, 2024
b699f07
black for migration example
David-Kreplin Oct 15, 2024
9f40577
add estimator migration example
David-Kreplin Oct 15, 2024
eb73182
start of the v2 executor primitiv implementation
David-Kreplin Oct 15, 2024
764ca23
fix automatic backend selection for qiskit<1
MoritzWillmann Oct 16, 2024
53b70b4
black tests
MoritzWillmann Oct 16, 2024
267af38
black src
MoritzWillmann Oct 16, 2024
53b75be
remove version constraints
MoritzWillmann Oct 16, 2024
a5a720f
make imports dependent on qiskit version
MoritzWillmann Oct 16, 2024
7ed9602
check against runtime version
MoritzWillmann Oct 16, 2024
21b21f6
wip
David-Kreplin Oct 16, 2024
dd01558
Merge branch 'qiskit_primitives_v2' of github.com:David-Kreplin/squle…
David-Kreplin Oct 16, 2024
de244a1
add v2 primitives to init
MoritzWillmann Oct 16, 2024
29a6254
fix for caching PrimtiveV2 results
David-Kreplin Oct 16, 2024
2596350
Merge branch 'qiskit_primitives_v2' of github.com:David-Kreplin/squle…
David-Kreplin Oct 16, 2024
e67f679
fix imports and shots
MoritzWillmann Oct 16, 2024
96e8cab
improve of error handling
David-Kreplin Oct 16, 2024
e23a133
merge of estiamtor mitigation
David-Kreplin Oct 16, 2024
cf7fb4e
fix run on IBM Quantum
David-Kreplin Oct 16, 2024
7533e69
add sampler and estimator v2
MoritzWillmann Oct 17, 2024
7edeea9
always import primitive sampler and estimator
MoritzWillmann Oct 18, 2024
278a3e8
wip
David-Kreplin Oct 18, 2024
66b8d7e
add preliminary parallelestimatorv2
MoritzWillmann Oct 18, 2024
d76313a
black
MoritzWillmann Oct 18, 2024
5b95839
fix for parameter-shift rule
David-Kreplin Oct 18, 2024
0f685ca
Merge branch 'qiskit_primitives_v2' of github.com:David-Kreplin/squle…
David-Kreplin Oct 18, 2024
47bf5b5
optree estimatorv2
David-Kreplin Oct 18, 2024
33d6c8f
sampler v2 in optree execution
David-Kreplin Oct 18, 2024
fd2ba71
add comment for better import
David-Kreplin Oct 18, 2024
7ae10c4
black
David-Kreplin Oct 18, 2024
38cf642
caching is already fixed
David-Kreplin Oct 21, 2024
523070a
primtive swapp for v2 primitives
David-Kreplin Oct 21, 2024
5363087
fix shots in init
MoritzWillmann Oct 21, 2024
9f029ac
Merge branch 'qiskit_primitives_v2' of github.com:David-Kreplin/squle…
MoritzWillmann Oct 21, 2024
f24c3a9
wip: RuntimePrimtivesV1 option
David-Kreplin Oct 22, 2024
46effa4
fix for PrimtiveV1 options
David-Kreplin Oct 22, 2024
3730051
fix run for ParallelEstimatorV2
MoritzWillmann Oct 22, 2024
f62f396
fix BitArray import
MoritzWillmann Oct 22, 2024
72720a9
fix ParallelEstimator comparison and estimator run
MoritzWillmann Oct 22, 2024
7b21bb6
update on options
David-Kreplin Oct 22, 2024
23ebace
merge
David-Kreplin Oct 22, 2024
6bce32e
seed working and many fix for options
David-Kreplin Oct 22, 2024
8e5f4e5
add error messages for QFI und FidelityKernels for V2 Primitives
David-Kreplin Oct 23, 2024
ac60231
fix in pruning
David-Kreplin Oct 23, 2024
5ab7616
add parallel sampler
MoritzWillmann Oct 23, 2024
35ada1e
Merge branch 'qiskit_primitives_v2' of github.com:David-Kreplin/squle…
MoritzWillmann Oct 23, 2024
acac131
fix comparisons
MoritzWillmann Oct 23, 2024
785df93
clean code a bit
MoritzWillmann Oct 23, 2024
cc94704
fix log message
MoritzWillmann Oct 23, 2024
e2882a2
several fixes
David-Kreplin Oct 23, 2024
96cc884
merge
David-Kreplin Oct 23, 2024
b78f2ec
fix for seed
David-Kreplin Oct 24, 2024
8e8de35
fix some tests
MoritzWillmann Oct 24, 2024
0e77821
adjustments in docu
David-Kreplin Oct 24, 2024
98dc5b9
Merge branch 'qiskit_primitives_v2' of github.com:David-Kreplin/squle…
David-Kreplin Oct 24, 2024
fa2d40f
fix tests
MoritzWillmann Oct 24, 2024
a1ea8b3
Merge branch 'qiskit_primitives_v2' of github.com:David-Kreplin/squle…
MoritzWillmann Oct 24, 2024
a1ee530
fix tests
MoritzWillmann Oct 24, 2024
605757c
fix for test_optree_evaluate.py + black
David-Kreplin Oct 24, 2024
07744d3
Merge branch 'qiskit_primitives_v2' of github.com:David-Kreplin/squle…
David-Kreplin Oct 24, 2024
8ce81d7
fix executor tests
MoritzWillmann Oct 24, 2024
3f7990f
Merge branch 'qiskit_primitives_v2' of github.com:David-Kreplin/squle…
MoritzWillmann Oct 24, 2024
06680b5
fix for test_auto_select_fidelity_kernel
David-Kreplin Oct 24, 2024
d13be82
Merge branch 'qiskit_primitives_v2' of github.com:David-Kreplin/squle…
David-Kreplin Oct 24, 2024
32c6f21
fix for test_automatic_backend_selection.py
David-Kreplin Oct 24, 2024
d919c15
fix imports and versions, delete notebooks
MoritzWillmann Oct 24, 2024
b1c6472
Merge branch 'qiskit_primitives_v2' of github.com:David-Kreplin/squle…
MoritzWillmann Oct 24, 2024
ede2103
fix of doku
David-Kreplin Oct 24, 2024
fd27b35
test more combinations
MoritzWillmann Oct 25, 2024
2d0ef5e
fix install_lowest_dependencies
MoritzWillmann Oct 25, 2024
2ca2ba2
fix tests
MoritzWillmann Oct 25, 2024
c45f1d5
fix qiskit version in qiskit 1 test
MoritzWillmann Oct 25, 2024
d9bacc6
black
MoritzWillmann Oct 25, 2024
70b0122
fix in optree_evaluate for older numpy versions
David-Kreplin Oct 25, 2024
25583f4
Merge branch 'qiskit_primitives_v2' of github.com:David-Kreplin/squle…
David-Kreplin Oct 25, 2024
e8f656a
fix for older numpy version
David-Kreplin Oct 25, 2024
d0cb21f
fix notebook
MoritzWillmann Oct 25, 2024
3d5b25e
fix in optree evaluate for z basis trafo
David-Kreplin Oct 25, 2024
e7d881c
fix in optree evaluate for z basis trafo
David-Kreplin Oct 25, 2024
0b15a72
Merge branch 'qiskit_primitives_v2' of github.com:David-Kreplin/squle…
David-Kreplin Oct 25, 2024
eb7a85a
cleaning of test
David-Kreplin Oct 25, 2024
249443a
add automatic swapp to v1 primitives for AWS Braket
David-Kreplin Oct 25, 2024
66e7b71
update of the qnn_backend_mitigation example
David-Kreplin Oct 25, 2024
3801604
update of qnn_backend_mitigation.ipynb
David-Kreplin Oct 25, 2024
1509e69
update of qnn_backend_mitigation.ipynb
David-Kreplin Oct 25, 2024
7edf830
removed token from example
David-Kreplin Oct 25, 2024
f50cb52
update of Executor user guide
David-Kreplin Oct 25, 2024
ebf15a8
fix caching
MoritzWillmann Oct 26, 2024
4191357
remove non existant example form toctree
MoritzWillmann Oct 26, 2024
c6b0911
fix matplotlib requirement
MoritzWillmann Oct 26, 2024
60e0131
catch warnings in docs
MoritzWillmann Oct 26, 2024
e7d5fba
fix docs
MoritzWillmann Oct 26, 2024
6e170c6
several fixes of the doku
David-Kreplin Oct 27, 2024
4895311
fix for storing PQKs with pickle
David-Kreplin Oct 27, 2024
10bc9bc
rename variables in optree
David-Kreplin Oct 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 99 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,120 @@ on:
- cron: '23 1 * * *'

jobs:
pytest:
pytest_minimal_requirements:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m venv venv_minimal
source venv_minimal/bin/activate
pip install toml
python3 install_lowest_dependencies.py
- name: Test with pytest
run: |
source venv_minimal/bin/activate
pip install pytest
pytest tests/
- name: Test examples
run: |
source venv_minimal/bin/activate
pip install nbmake
pytest --nbmake --nbmake-timeout 600 examples/
- name: clean
run: |
rm -rf venv_minimal

pytest_qiskit_0_46:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m venv venv_qiskit_0_46
source venv_qiskit_0_46/bin/activate
pip install .[examples] qiskit==0.46.3 qiskit-ibm-runtime==0.20.0
- name: Test with pytest
run: |
source venv_qiskit_0_46/bin/activate
pip install pytest
pytest tests/
- name: Test examples
run: |
source venv_qiskit_0_46/bin/activate
pip install nbmake
pytest --nbmake --nbmake-timeout 600 examples/
- name: clean
run: |
rm -rf venv_qiskit_0_46

pytest_qiskit_1:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m venv venv_qiskit_1
source venv_qiskit_1/bin/activate
pip install .[examples] qiskit==1.1.2 qiskit-ibm-runtime==0.27.1
- name: Test with pytest
run: |
source venv_qiskit_1/bin/activate
pip install pytest
pytest tests/
- name: Test examples
run: |
source venv_qiskit_1/bin/activate
pip install nbmake
pytest --nbmake --nbmake-timeout 600 examples/
- name: clean
run: |
rm -rf venv_qiskit_1

pytest_latest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: |
3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m venv venv_latest
source venv_latest/bin/activate
pip install .[examples]
- name: Test with pytest
run: |
source venv_latest/bin/activate
pip install pytest
pytest tests/
- name: Test examples
run: |
source venv_latest/bin/activate
pip install nbmake
pytest --nbmake --nbmake-timeout 600 examples/
pytest --nbmake --nbmake-timeout 600 examples/
- name: clean
run: |
rm -rf venv_latest
45 changes: 38 additions & 7 deletions docs/install/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,20 @@ Prerequisites
sQUlearn requires a recent python3 (>=3.9) installation.
Additionally the following python packages are necessary: ::

numpy>=1.17
scipy>=1.5
scikit-learn>=1.0
qiskit>=0.42.1
bayesian-optimization>=1.4.3,<2
dill>=0.3.4
mapomatic>=0.10.0
networkx>=3.0
numpy>=1.20
pennylane>=0.34.0
qiskit>=0.45.0
qiskit-aer>=0.12.0
qiskit-machine-learning>=0.6.0
qiskit-ibm-runtime>=0.9
dill>=0.3
qiskit-algorithms>=0.3.0
qiskit-ibm-runtime>=0.18.0
qiskit-machine-learning>=0.7.0
scipy>=1.8.0
scikit-learn>=1.2.0,<1.4.2
tqdm>=4.1.0

The packages are automatically installed when installing sQUlearn with pip.

Expand Down Expand Up @@ -48,3 +54,28 @@ To install the latest development version:
.. code-block:: bash

pip install git+https://github.com/sQUlearn/squlearn.git@develop



Installation with optional dependencies:
----------------------------------------

There are several optional dependencies that can be installed with sQUlearn.
To install sQUlearn with the dependencies usefull for development, run the following command:

.. code-block:: bash

pip install squlearn[dev]

To install sQUlearn with the dependencies necessary to run all examples, run the following command:

.. code-block:: bash

pip install squlearn[examples]

And to install sQUlearn with the dependencies necessary to build the documentation,
run the following command:

.. code-block:: bash

pip install squlearn[docs]
2 changes: 1 addition & 1 deletion docs/user_guide/encoding_circuits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ sQUlearn features a fully automated pruning algorithm which can be used by calli
from squlearn.encoding_circuit import LayeredEncodingCircuit, automated_pruning
from squlearn.util import Executor
encoding_circuit = LayeredEncodingCircuit.from_string("Rz(p)-Ry(p)-Z-Ry(p)-Rz(p)", num_qubits=2, num_features=0)
pruned_encoding_circuit = automated_pruning(encoding_circuit, Executor("statevector_simulator"))
pruned_encoding_circuit = automated_pruning(encoding_circuit, Executor())
pruned_encoding_circuit.draw(output="mpl")


Expand Down
Loading