lazyqml 3.0.5__tar.gz → 3.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lazyqml-3.0.5 → lazyqml-3.1.0}/.github/workflows/docs.yml +5 -10
- lazyqml-3.1.0/PKG-INFO +130 -0
- lazyqml-3.1.0/README.md +91 -0
- lazyqml-3.1.0/docs/common.md +3 -0
- lazyqml-3.1.0/docs/logo.jpg +0 -0
- lazyqml-3.1.0/lazyqml/Interfaces/__init__.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/__init__.py +1 -1
- lazyqml-3.1.0/lazyqml.egg-info/PKG-INFO +130 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml.egg-info/SOURCES.txt +1 -1
- {lazyqml-3.0.5 → lazyqml-3.1.0}/mkdocs.yml +7 -18
- {lazyqml-3.0.5 → lazyqml-3.1.0}/pyproject.toml +2 -2
- lazyqml-3.0.5/PKG-INFO +0 -122
- lazyqml-3.0.5/README copy.md +0 -71
- lazyqml-3.0.5/README.md +0 -83
- lazyqml-3.0.5/docs/common.md +0 -3
- lazyqml-3.0.5/docs/lazyqml.md +0 -4
- lazyqml-3.0.5/lazyqml.egg-info/PKG-INFO +0 -122
- {lazyqml-3.0.5 → lazyqml-3.1.0}/.editorconfig +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/.github/workflows/docs-build.yml +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/.github/workflows/installation.yml +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/.github/workflows/pypi.yml +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/.github/workflows/ubuntu.yml +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/.gitignore +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/AUTHORS.rst +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/LICENSE +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/LICENSE copy +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/MANIFEST.in +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/docs/authors.rst +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/docs/changelog.md +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/docs/contributing.md +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/docs/examples/intro.ipynb +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/docs/faq.md +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/docs/index.md +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/docs/installation.md +0 -0
- /lazyqml-3.0.5/lazyqml/Factories/Preprocessing/__init__.py → /lazyqml-3.1.0/docs/lazyqml.md +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/docs/overrides/main.html +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/docs/usage.md +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/experimentallibs.txt +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Circuits/AmplitudeEmbedding.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Circuits/HCzRx.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Circuits/HardwareEfficient.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Circuits/RxEmbedding.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Circuits/RyEmbedding.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Circuits/RzEmbedding.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Circuits/TreeTensor.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Circuits/TwoLocal.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Circuits/ZzEmbedding.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Circuits/fCircuits.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Dispatchers/Dispatcher.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Models/Hybrid.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Models/QNNBag.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Models/QNNTorch.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Models/QSVM.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Models/_QNNPennylane.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Models/fModels.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Preprocessing/Pca.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Preprocessing/Sanitizer.py +0 -0
- {lazyqml-3.0.5/lazyqml/Factories → lazyqml-3.1.0/lazyqml/Factories/Preprocessing}/__init__.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Factories/Preprocessing/fPreprocessing.py +0 -0
- {lazyqml-3.0.5/lazyqml/Interfaces → lazyqml-3.1.0/lazyqml/Factories}/__init__.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Global/globalEnums.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Interfaces/iAnsatz.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Interfaces/iCircuit.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Interfaces/iModel.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Interfaces/iPreprocessing.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Utils/Utils.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/Utils/Validator.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml/lazyqml.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml.egg-info/dependency_links.txt +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml.egg-info/entry_points.txt +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml.egg-info/requires.txt +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/lazyqml.egg-info/top_level.txt +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/requirements.txt +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/requirements_dev.txt +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/setup.cfg +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/tests/__init__.py +0 -0
- {lazyqml-3.0.5 → lazyqml-3.1.0}/tests/test_lazyqml.py +0 -0
|
@@ -3,7 +3,6 @@ on:
|
|
|
3
3
|
push:
|
|
4
4
|
branches:
|
|
5
5
|
- main
|
|
6
|
-
- master
|
|
7
6
|
jobs:
|
|
8
7
|
deploy:
|
|
9
8
|
runs-on: ubuntu-latest
|
|
@@ -11,19 +10,15 @@ jobs:
|
|
|
11
10
|
- uses: actions/checkout@v4
|
|
12
11
|
- uses: actions/setup-python@v5
|
|
13
12
|
with:
|
|
14
|
-
python-version: "3.
|
|
15
|
-
|
|
13
|
+
python-version: "3.11"
|
|
16
14
|
- name: Install dependencies
|
|
17
15
|
run: |
|
|
18
16
|
python -m pip install --upgrade pip
|
|
19
17
|
pip install --user --no-cache-dir Cython
|
|
20
|
-
pip install --user -r requirements.txt
|
|
21
|
-
pip install .
|
|
22
|
-
- name: Discover typos with codespell
|
|
23
|
-
run: |
|
|
24
|
-
codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,./.git" --ignore-words-list="aci,hist"
|
|
18
|
+
pip install --user -r requirements.txt
|
|
25
19
|
- name: PKG-TEST
|
|
26
20
|
run: |
|
|
27
21
|
python -m unittest discover tests/
|
|
28
|
-
- run:
|
|
29
|
-
|
|
22
|
+
- run: python -m pip install --upgrade pip
|
|
23
|
+
- run: pip install mkdocs-material mkdocstrings mkdocstrings-python-legacy mkdocs-git-revision-date-plugin mkdocs-jupyter
|
|
24
|
+
- run: mkdocs gh-deploy --force
|
lazyqml-3.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: lazyqml
|
|
3
|
+
Version: 3.1.0
|
|
4
|
+
Summary: LazyQML benchmarking utility to test quantum machine learning models.
|
|
5
|
+
Author-email: QHPC Group <qhpcgroup@gmail.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
Project-URL: Homepage, https://github.com/QHPC-SP-Research-Lab/LazyQML
|
|
8
|
+
Keywords: lazyqml
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Natural Language :: English
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Requires-Python: >=3.9
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
License-File: LICENSE copy
|
|
17
|
+
License-File: AUTHORS.rst
|
|
18
|
+
Requires-Dist: wheel
|
|
19
|
+
Requires-Dist: tabulate
|
|
20
|
+
Requires-Dist: torch
|
|
21
|
+
Requires-Dist: torchaudio
|
|
22
|
+
Requires-Dist: torchvision
|
|
23
|
+
Requires-Dist: scipy
|
|
24
|
+
Requires-Dist: scikit-learn
|
|
25
|
+
Requires-Dist: PennyLane
|
|
26
|
+
Requires-Dist: PennyLane_Lightning
|
|
27
|
+
Requires-Dist: PennyLane_Lightning_GPU
|
|
28
|
+
Requires-Dist: custatevec_cu12
|
|
29
|
+
Requires-Dist: ucimlrepo
|
|
30
|
+
Requires-Dist: pydantic
|
|
31
|
+
Requires-Dist: psutil
|
|
32
|
+
Requires-Dist: pandas
|
|
33
|
+
Requires-Dist: joblib
|
|
34
|
+
Requires-Dist: gputil
|
|
35
|
+
Provides-Extra: all
|
|
36
|
+
Requires-Dist: lazyqml[extra]; extra == "all"
|
|
37
|
+
Provides-Extra: extra
|
|
38
|
+
Requires-Dist: pandas; extra == "extra"
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
---
|
|
42
|
+
[](https://pypi.python.org/pypi/lazyqml)
|
|
43
|
+

|
|
44
|
+

|
|
45
|
+

|
|
46
|
+

|
|
47
|
+

|
|
48
|
+

|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
LazyQML is a Python library designed to streamline, automate, and accelerate experimentation with Quantum Machine Learning (QML) architectures, right on classical computers.
|
|
54
|
+
|
|
55
|
+
With LazyQML, you can:
|
|
56
|
+
- 🛠️ Build, test, and benchmark QML models with minimal effort.
|
|
57
|
+
|
|
58
|
+
- ⚡ Compare different QML architectures, hyperparameters seamlessly.
|
|
59
|
+
|
|
60
|
+
- 🧠 Gather knowledge about the most suitable architecture for your problem.
|
|
61
|
+
|
|
62
|
+
## ✨ Why LazyQML?
|
|
63
|
+
|
|
64
|
+
- Rapid Prototyping: Experiment with different QML models using just a few lines of code.
|
|
65
|
+
|
|
66
|
+
- Automated Benchmarking: Evaluate performance and trade-offs across architectures effortlessly.
|
|
67
|
+
|
|
68
|
+
- Flexible & Modular: From basic quantum circuits to hybrid quantum-classical models—LazyQML has you covered.
|
|
69
|
+
|
|
70
|
+
## Documentation
|
|
71
|
+
For detailed usage instructions, API reference, and code examples, please refer to the official LazyQML documentation.
|
|
72
|
+
|
|
73
|
+
## Requirements
|
|
74
|
+
|
|
75
|
+
- Python >= 3.10
|
|
76
|
+
|
|
77
|
+
> [!CAUTION]
|
|
78
|
+
> This library is only supported by Linux Systems. It doesn't support Windows nor MacOS.
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
## Installation
|
|
82
|
+
To install lazyqml, run this command in your terminal:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
pip install lazyqml
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
This is the preferred method to install lazyqml, as it will always install the most recent stable release.
|
|
89
|
+
|
|
90
|
+
If you don't have [pip](https://pip.pypa.io) installed, this [Python installation guide](http://docs.python-guide.org/en/latest/starting/installation/) can guide you through the process.
|
|
91
|
+
|
|
92
|
+
### From sources
|
|
93
|
+
|
|
94
|
+
To install lazyqml from sources, run this command in your terminal:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
pip install git+https://github.com/QHPC-SP-Research-Lab/LazyQML
|
|
98
|
+
```
|
|
99
|
+
## Example
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
from sklearn.datasets import load_iris
|
|
103
|
+
from lazyqml.lazyqml import *
|
|
104
|
+
|
|
105
|
+
# Load data
|
|
106
|
+
data = load_iris()
|
|
107
|
+
X = data.data
|
|
108
|
+
y = data.target
|
|
109
|
+
|
|
110
|
+
classifier = QuantumClassifier(nqubits={4}, classifiers={Model.QNN, Model.QSVM}, epochs=10)
|
|
111
|
+
|
|
112
|
+
# Fit and predict
|
|
113
|
+
classifier.fit(X=X, y=y, test_size=0.4)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Quantum and High Performance Computing (QHPC) - University of Oviedo
|
|
117
|
+
- José Ranilla Pastor - ranilla@uniovi.es
|
|
118
|
+
- Elías Fernández Combarro - efernandezca@uniovi.es
|
|
119
|
+
- Diego García Vega - diegogarciavega@gmail.com
|
|
120
|
+
- Fernando Álvaro Plou Llorente - ploufernando@uniovi.es
|
|
121
|
+
- Alejandro Leal Castaño - lealcalejandro@uniovi.es
|
|
122
|
+
- Group - https://qhpc.uniovi.es
|
|
123
|
+
|
|
124
|
+
## Citing
|
|
125
|
+
If you used LazyQML in your work, please cite:
|
|
126
|
+
- García-Vega, D., Plou Llorente, F., Leal Castaño, A., Combarro, E.F., Ranilla, J.: Lazyqml: A python library to benchmark quantum machine learning models. In: 30th European Conference on Parallel and Distributed Processing (2024)
|
|
127
|
+
|
|
128
|
+
## License
|
|
129
|
+
- Free software: MIT License
|
|
130
|
+
|
lazyqml-3.1.0/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+

|
|
2
|
+
---
|
|
3
|
+
[](https://pypi.python.org/pypi/lazyqml)
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
LazyQML is a Python library designed to streamline, automate, and accelerate experimentation with Quantum Machine Learning (QML) architectures, right on classical computers.
|
|
15
|
+
|
|
16
|
+
With LazyQML, you can:
|
|
17
|
+
- 🛠️ Build, test, and benchmark QML models with minimal effort.
|
|
18
|
+
|
|
19
|
+
- ⚡ Compare different QML architectures, hyperparameters seamlessly.
|
|
20
|
+
|
|
21
|
+
- 🧠 Gather knowledge about the most suitable architecture for your problem.
|
|
22
|
+
|
|
23
|
+
## ✨ Why LazyQML?
|
|
24
|
+
|
|
25
|
+
- Rapid Prototyping: Experiment with different QML models using just a few lines of code.
|
|
26
|
+
|
|
27
|
+
- Automated Benchmarking: Evaluate performance and trade-offs across architectures effortlessly.
|
|
28
|
+
|
|
29
|
+
- Flexible & Modular: From basic quantum circuits to hybrid quantum-classical models—LazyQML has you covered.
|
|
30
|
+
|
|
31
|
+
## Documentation
|
|
32
|
+
For detailed usage instructions, API reference, and code examples, please refer to the official LazyQML documentation.
|
|
33
|
+
|
|
34
|
+
## Requirements
|
|
35
|
+
|
|
36
|
+
- Python >= 3.10
|
|
37
|
+
|
|
38
|
+
> [!CAUTION]
|
|
39
|
+
> This library is only supported by Linux Systems. It doesn't support Windows nor MacOS.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
To install lazyqml, run this command in your terminal:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
pip install lazyqml
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
This is the preferred method to install lazyqml, as it will always install the most recent stable release.
|
|
50
|
+
|
|
51
|
+
If you don't have [pip](https://pip.pypa.io) installed, this [Python installation guide](http://docs.python-guide.org/en/latest/starting/installation/) can guide you through the process.
|
|
52
|
+
|
|
53
|
+
### From sources
|
|
54
|
+
|
|
55
|
+
To install lazyqml from sources, run this command in your terminal:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
pip install git+https://github.com/QHPC-SP-Research-Lab/LazyQML
|
|
59
|
+
```
|
|
60
|
+
## Example
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
from sklearn.datasets import load_iris
|
|
64
|
+
from lazyqml.lazyqml import *
|
|
65
|
+
|
|
66
|
+
# Load data
|
|
67
|
+
data = load_iris()
|
|
68
|
+
X = data.data
|
|
69
|
+
y = data.target
|
|
70
|
+
|
|
71
|
+
classifier = QuantumClassifier(nqubits={4}, classifiers={Model.QNN, Model.QSVM}, epochs=10)
|
|
72
|
+
|
|
73
|
+
# Fit and predict
|
|
74
|
+
classifier.fit(X=X, y=y, test_size=0.4)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Quantum and High Performance Computing (QHPC) - University of Oviedo
|
|
78
|
+
- José Ranilla Pastor - ranilla@uniovi.es
|
|
79
|
+
- Elías Fernández Combarro - efernandezca@uniovi.es
|
|
80
|
+
- Diego García Vega - diegogarciavega@gmail.com
|
|
81
|
+
- Fernando Álvaro Plou Llorente - ploufernando@uniovi.es
|
|
82
|
+
- Alejandro Leal Castaño - lealcalejandro@uniovi.es
|
|
83
|
+
- Group - https://qhpc.uniovi.es
|
|
84
|
+
|
|
85
|
+
## Citing
|
|
86
|
+
If you used LazyQML in your work, please cite:
|
|
87
|
+
- García-Vega, D., Plou Llorente, F., Leal Castaño, A., Combarro, E.F., Ranilla, J.: Lazyqml: A python library to benchmark quantum machine learning models. In: 30th European Conference on Parallel and Distributed Processing (2024)
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
- Free software: MIT License
|
|
91
|
+
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: lazyqml
|
|
3
|
+
Version: 3.1.0
|
|
4
|
+
Summary: LazyQML benchmarking utility to test quantum machine learning models.
|
|
5
|
+
Author-email: QHPC Group <qhpcgroup@gmail.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
Project-URL: Homepage, https://github.com/QHPC-SP-Research-Lab/LazyQML
|
|
8
|
+
Keywords: lazyqml
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Natural Language :: English
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Requires-Python: >=3.9
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
License-File: LICENSE copy
|
|
17
|
+
License-File: AUTHORS.rst
|
|
18
|
+
Requires-Dist: wheel
|
|
19
|
+
Requires-Dist: tabulate
|
|
20
|
+
Requires-Dist: torch
|
|
21
|
+
Requires-Dist: torchaudio
|
|
22
|
+
Requires-Dist: torchvision
|
|
23
|
+
Requires-Dist: scipy
|
|
24
|
+
Requires-Dist: scikit-learn
|
|
25
|
+
Requires-Dist: PennyLane
|
|
26
|
+
Requires-Dist: PennyLane_Lightning
|
|
27
|
+
Requires-Dist: PennyLane_Lightning_GPU
|
|
28
|
+
Requires-Dist: custatevec_cu12
|
|
29
|
+
Requires-Dist: ucimlrepo
|
|
30
|
+
Requires-Dist: pydantic
|
|
31
|
+
Requires-Dist: psutil
|
|
32
|
+
Requires-Dist: pandas
|
|
33
|
+
Requires-Dist: joblib
|
|
34
|
+
Requires-Dist: gputil
|
|
35
|
+
Provides-Extra: all
|
|
36
|
+
Requires-Dist: lazyqml[extra]; extra == "all"
|
|
37
|
+
Provides-Extra: extra
|
|
38
|
+
Requires-Dist: pandas; extra == "extra"
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
---
|
|
42
|
+
[](https://pypi.python.org/pypi/lazyqml)
|
|
43
|
+

|
|
44
|
+

|
|
45
|
+

|
|
46
|
+

|
|
47
|
+

|
|
48
|
+

|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
LazyQML is a Python library designed to streamline, automate, and accelerate experimentation with Quantum Machine Learning (QML) architectures, right on classical computers.
|
|
54
|
+
|
|
55
|
+
With LazyQML, you can:
|
|
56
|
+
- 🛠️ Build, test, and benchmark QML models with minimal effort.
|
|
57
|
+
|
|
58
|
+
- ⚡ Compare different QML architectures, hyperparameters seamlessly.
|
|
59
|
+
|
|
60
|
+
- 🧠 Gather knowledge about the most suitable architecture for your problem.
|
|
61
|
+
|
|
62
|
+
## ✨ Why LazyQML?
|
|
63
|
+
|
|
64
|
+
- Rapid Prototyping: Experiment with different QML models using just a few lines of code.
|
|
65
|
+
|
|
66
|
+
- Automated Benchmarking: Evaluate performance and trade-offs across architectures effortlessly.
|
|
67
|
+
|
|
68
|
+
- Flexible & Modular: From basic quantum circuits to hybrid quantum-classical models—LazyQML has you covered.
|
|
69
|
+
|
|
70
|
+
## Documentation
|
|
71
|
+
For detailed usage instructions, API reference, and code examples, please refer to the official LazyQML documentation.
|
|
72
|
+
|
|
73
|
+
## Requirements
|
|
74
|
+
|
|
75
|
+
- Python >= 3.10
|
|
76
|
+
|
|
77
|
+
> [!CAUTION]
|
|
78
|
+
> This library is only supported by Linux Systems. It doesn't support Windows nor MacOS.
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
## Installation
|
|
82
|
+
To install lazyqml, run this command in your terminal:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
pip install lazyqml
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
This is the preferred method to install lazyqml, as it will always install the most recent stable release.
|
|
89
|
+
|
|
90
|
+
If you don't have [pip](https://pip.pypa.io) installed, this [Python installation guide](http://docs.python-guide.org/en/latest/starting/installation/) can guide you through the process.
|
|
91
|
+
|
|
92
|
+
### From sources
|
|
93
|
+
|
|
94
|
+
To install lazyqml from sources, run this command in your terminal:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
pip install git+https://github.com/QHPC-SP-Research-Lab/LazyQML
|
|
98
|
+
```
|
|
99
|
+
## Example
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
from sklearn.datasets import load_iris
|
|
103
|
+
from lazyqml.lazyqml import *
|
|
104
|
+
|
|
105
|
+
# Load data
|
|
106
|
+
data = load_iris()
|
|
107
|
+
X = data.data
|
|
108
|
+
y = data.target
|
|
109
|
+
|
|
110
|
+
classifier = QuantumClassifier(nqubits={4}, classifiers={Model.QNN, Model.QSVM}, epochs=10)
|
|
111
|
+
|
|
112
|
+
# Fit and predict
|
|
113
|
+
classifier.fit(X=X, y=y, test_size=0.4)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Quantum and High Performance Computing (QHPC) - University of Oviedo
|
|
117
|
+
- José Ranilla Pastor - ranilla@uniovi.es
|
|
118
|
+
- Elías Fernández Combarro - efernandezca@uniovi.es
|
|
119
|
+
- Diego García Vega - diegogarciavega@gmail.com
|
|
120
|
+
- Fernando Álvaro Plou Llorente - ploufernando@uniovi.es
|
|
121
|
+
- Alejandro Leal Castaño - lealcalejandro@uniovi.es
|
|
122
|
+
- Group - https://qhpc.uniovi.es
|
|
123
|
+
|
|
124
|
+
## Citing
|
|
125
|
+
If you used LazyQML in your work, please cite:
|
|
126
|
+
- García-Vega, D., Plou Llorente, F., Leal Castaño, A., Combarro, E.F., Ranilla, J.: Lazyqml: A python library to benchmark quantum machine learning models. In: 30th European Conference on Parallel and Distributed Processing (2024)
|
|
127
|
+
|
|
128
|
+
## License
|
|
129
|
+
- Free software: MIT License
|
|
130
|
+
|
|
@@ -4,7 +4,6 @@ AUTHORS.rst
|
|
|
4
4
|
LICENSE
|
|
5
5
|
LICENSE copy
|
|
6
6
|
MANIFEST.in
|
|
7
|
-
README copy.md
|
|
8
7
|
README.md
|
|
9
8
|
experimentallibs.txt
|
|
10
9
|
mkdocs.yml
|
|
@@ -27,6 +26,7 @@ docs/faq.md
|
|
|
27
26
|
docs/index.md
|
|
28
27
|
docs/installation.md
|
|
29
28
|
docs/lazyqml.md
|
|
29
|
+
docs/logo.jpg
|
|
30
30
|
docs/usage.md
|
|
31
31
|
docs/examples/intro.ipynb
|
|
32
32
|
docs/overrides/main.html
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
site_name: lazyqml
|
|
2
2
|
site_description: LazyQML benchmarking utility to test quantum machine learning models.
|
|
3
|
-
site_author:
|
|
4
|
-
site_url: https://
|
|
5
|
-
repo_url: https://github.com/
|
|
3
|
+
site_author: QHPC Group
|
|
4
|
+
site_url: https://QHPC-SP-Research-Lab.github.io/lazyqml
|
|
5
|
+
repo_url: https://github.com/QHPC-SP-Research-Lab/LazyQML
|
|
6
6
|
|
|
7
7
|
copyright: "Copyright © 2024 - 2024 Diego García Vega"
|
|
8
8
|
|
|
@@ -40,18 +40,7 @@ plugins:
|
|
|
40
40
|
- search
|
|
41
41
|
- mkdocstrings
|
|
42
42
|
- git-revision-date
|
|
43
|
-
|
|
44
|
-
enable_creation_date: true
|
|
45
|
-
type: timeago
|
|
46
|
-
# - pdf-export
|
|
47
|
-
- mkdocs-jupyter:
|
|
48
|
-
include_source: True
|
|
49
|
-
ignore_h1_titles: True
|
|
50
|
-
execute: True
|
|
51
|
-
allow_errors: false
|
|
52
|
-
ignore: ["conf.py"]
|
|
53
|
-
execute_ignore: ["*ignore.ipynb"]
|
|
54
|
-
|
|
43
|
+
|
|
55
44
|
markdown_extensions:
|
|
56
45
|
- admonition
|
|
57
46
|
- abbr
|
|
@@ -78,9 +67,9 @@ nav:
|
|
|
78
67
|
- Contributing: contributing.md
|
|
79
68
|
- FAQ: faq.md
|
|
80
69
|
- Changelog: changelog.md
|
|
81
|
-
- Report Issues: https://github.com/
|
|
70
|
+
- Report Issues: https://github.com/QHPC-SP-Research-Lab/LazyQML/issues
|
|
82
71
|
- Examples:
|
|
83
72
|
- examples/intro.ipynb
|
|
84
73
|
- API Reference:
|
|
85
|
-
|
|
86
|
-
|
|
74
|
+
- lazyqml module: lazyqml.md
|
|
75
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "lazyqml"
|
|
3
|
-
version = "3.0
|
|
3
|
+
version = "3.1.0"
|
|
4
4
|
dynamic = [
|
|
5
5
|
"dependencies",
|
|
6
6
|
]
|
|
@@ -48,7 +48,7 @@ universal = true
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
[tool.bumpversion]
|
|
51
|
-
current_version = "3.0
|
|
51
|
+
current_version = "3.1.0"
|
|
52
52
|
commit = true
|
|
53
53
|
tag = true
|
|
54
54
|
|
lazyqml-3.0.5/PKG-INFO
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: lazyqml
|
|
3
|
-
Version: 3.0.5
|
|
4
|
-
Summary: LazyQML benchmarking utility to test quantum machine learning models.
|
|
5
|
-
Author-email: QHPC Group <qhpcgroup@gmail.com>
|
|
6
|
-
License: MIT License
|
|
7
|
-
Project-URL: Homepage, https://github.com/QHPC-SP-Research-Lab/LazyQML
|
|
8
|
-
Keywords: lazyqml
|
|
9
|
-
Classifier: Intended Audience :: Science/Research
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Natural Language :: English
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
-
Requires-Python: >=3.9
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
License-File: LICENSE
|
|
16
|
-
License-File: LICENSE copy
|
|
17
|
-
License-File: AUTHORS.rst
|
|
18
|
-
Requires-Dist: wheel
|
|
19
|
-
Requires-Dist: tabulate
|
|
20
|
-
Requires-Dist: torch
|
|
21
|
-
Requires-Dist: torchaudio
|
|
22
|
-
Requires-Dist: torchvision
|
|
23
|
-
Requires-Dist: scipy
|
|
24
|
-
Requires-Dist: scikit-learn
|
|
25
|
-
Requires-Dist: PennyLane
|
|
26
|
-
Requires-Dist: PennyLane_Lightning
|
|
27
|
-
Requires-Dist: PennyLane_Lightning_GPU
|
|
28
|
-
Requires-Dist: custatevec_cu12
|
|
29
|
-
Requires-Dist: ucimlrepo
|
|
30
|
-
Requires-Dist: pydantic
|
|
31
|
-
Requires-Dist: psutil
|
|
32
|
-
Requires-Dist: pandas
|
|
33
|
-
Requires-Dist: joblib
|
|
34
|
-
Requires-Dist: gputil
|
|
35
|
-
Provides-Extra: all
|
|
36
|
-
Requires-Dist: lazyqml[extra]; extra == "all"
|
|
37
|
-
Provides-Extra: extra
|
|
38
|
-
Requires-Dist: pandas; extra == "extra"
|
|
39
|
-
|
|
40
|
-
# LazyQML
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
[](https://pypi.python.org/pypi/lazyqml)
|
|
44
|
-

|
|
45
|
-

|
|
46
|
-

|
|
47
|
-

|
|
48
|
-

|
|
49
|
-

|
|
50
|
-
<img src="https://assets.cloud.pennylane.ai/pennylane_website/generic/logo.svg" alt="Pennylane Logo" style="background-color: white; padding: 2px;" />
|
|
51
|
-

|
|
52
|
-
|
|
53
|
-
<!--  -->
|
|
54
|
-
|
|
55
|
-
pLazyQML, a software package designed to accelerate, automate, and streamline experimentation with quantum machine learning models on classical computers. pLazyQML reduces the complexity and time required for developing and testing quantum-enhanced machine learning models.
|
|
56
|
-
## Usage
|
|
57
|
-
```python
|
|
58
|
-
from lazyqml.lazyqml import QuantumClassifier
|
|
59
|
-
from lazyqml.Global.globalEnums import *
|
|
60
|
-
from sklearn.datasets import load_breast_cancer, load_iris
|
|
61
|
-
from sklearn.model_selection import train_test_split
|
|
62
|
-
# Load data
|
|
63
|
-
data = load_iris()
|
|
64
|
-
X = data.data
|
|
65
|
-
y = data.target
|
|
66
|
-
|
|
67
|
-
# Split data
|
|
68
|
-
X_train, X_test, y_train, y_test = train_test_split(X, y,test_size=.3,random_state =123)
|
|
69
|
-
|
|
70
|
-
# Initialize L azyClass ifier
|
|
71
|
-
classifier = QuantumClassifier(nqubits={4,8,16},verbose=True,sequential=False,backend=Backend.lightningQubit)
|
|
72
|
-
|
|
73
|
-
# Fit and predict
|
|
74
|
-
classifier.fit(X_train=X_train,y_train=y_train,X_test=X_test,y_test=y_test)
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## License & Compatibility
|
|
78
|
-
- Free software: MIT License
|
|
79
|
-
- This Python package is only compatible with Linux systems.
|
|
80
|
-
- Hardware acceleration is only enabled using CUDA-compatible devices.
|
|
81
|
-
## Quantum and High Performance Computing (QHPC) - University of Oviedo
|
|
82
|
-
- José Ranilla Pastor - ranilla@uniovi.es
|
|
83
|
-
- Elías Fernández Combarro - efernandezca@uniovi.es
|
|
84
|
-
- Diego García Vega - diegogarciavega@gmail.com
|
|
85
|
-
- Fernando Álvaro Plou Llorente - ploufernando@uniovi.es
|
|
86
|
-
- Alejandro Leal Castaño - lealcalejandro@uniovi.es
|
|
87
|
-
- Group - https://qhpc.uniovi.es
|
|
88
|
-
|
|
89
|
-
## Parameters:
|
|
90
|
-
- **verbose** _bool, optional (default=False)_: If set to True, detailed messages about the training process will be displayed, helping users to monitor the progress and debug if necessary.
|
|
91
|
-
- **customMetric** _function, optional (default=None)_: A custom evaluation function provided by the user to evaluate the models. This allows the user to define their own metrics tailored to specific requirements.
|
|
92
|
-
- **customImputerNum** _function, optional (default=None)_: A custom function provided by the user to handle the imputation of missing numeric data. This provides flexibility in how missing values are treated in the dataset.
|
|
93
|
-
- **customImputerCat** _function, optional (default=None)_: A custom function provided by the user to handle the imputation of missing categorical data, allowing users to apply their own strategies for handling missing categorical values.
|
|
94
|
-
- **prediction** _bool, optional (default=False)_: If set to True, the predictions made by all the models will be returned as a pandas DataFrame for easy comparison and analysis of different models’ outputs.
|
|
95
|
-
- **classifiers** _set of enums, optional (default={Model.ALL})_: A set specifying which classifiers to train. Options include `{Model.ALL, Model.QSVM, Model.QNN, Model.QNN_BAG}`, enabling the user to select specific quantum classifiers or train all available ones.
|
|
96
|
-
- **embeddings** _set of enums, optional (default={Embedding.ALL})_: A set specifying which embeddings to use for training. Options include `{Embedding.ALL, Embedding.RX, Embedding.RZ, Embedding.RY, Embedding.ZZ, Embedding.AMP}`, allowing the user to choose specific data encodings.
|
|
97
|
-
- **ansatzs** _set of enums, optional (default={Ansatzs.ALL})_: A set specifying which quantum circuit ansatzes to use. Options include `{Ansatzs.ALL, Ansatzs.HCZRX, Ansatzs.TREE_TENSOR, Ansatzs.TWO_LOCAL, Ansatzs.HARDWARE_EFFICIENT}`, giving users the ability to experiment with different quantum circuit structures.
|
|
98
|
-
- **randomState** _int, optional (default=1234)_: An integer seed used to ensure the repeatability of experiments, making the results consistent across different runs.
|
|
99
|
-
- **nqubits** _int, optional (default=8)_: Specifies the number of qubits for the quantum circuits used by the models. This parameter controls the size of the quantum circuits.
|
|
100
|
-
- **numLayers** _int, optional (default=5)_: Indicates the number of layers in the Quantum Neural Network (QNN) models, affecting the depth and potentially the performance of the neural networks.
|
|
101
|
-
- **numPredictors** _int, optional (default=10)_: Specifies the number of different predictors used in Quantum Neural Networks with Bagging (QNN_Bag). This parameter controls the ensemble size in bagging models.
|
|
102
|
-
- **maxSamples** _float, optional (default=1.0)_: A floating point number between 0 and 1.0 indicating the fraction of the dataset to be used for each Quantum Neural Network with Bagging (QNN_Bag).
|
|
103
|
-
- **maxFeatures** _float, optional (default=0.8)_: A floating point number between 0 and 1.0 indicating the fraction of the dataset features to be used for each Quantum Neural Network with Bagging (QNN_Bag).
|
|
104
|
-
- **runs** _int, optional (default=1)_: The number of training runs for the Quantum Neural Network (QNN) models. This parameter determines how many times the model is trained and evaluated.
|
|
105
|
-
- **learningRate** _float, optional (default=0.01)_: The learning rate for the gradient descent optimization process used in all Quantum Neural Networks (QNNs). This controls how much the model's weights are updated during each training step.
|
|
106
|
-
- **epochs** _int, optional (default=100)_: The number of complete passes through the dataset during model fitting. More epochs can allow the model to converge more accurately, though may increase computation time.
|
|
107
|
-
- **backend** _enum, optional (default=Backend.lightningQubit)_: This field controls the acceleration used in the quantum simulator. Supported values are `{Backend.lightningQubit, Backend.lightningGPU, Backend.defaultQubit}`, specifying which backend to use for quantum circuit simulation.
|
|
108
|
-
- **threshold** _int, optional (default=22)_: Integer value used to delimit from which number of qubits the internal operations of the models start to be parallelized. This helps optimize performance for larger quantum circuits.
|
|
109
|
-
- **cores** _int, optional (default=-1)_: Number of processes to be created by the dispatcher to run the selected models. Each process will be allocated as many CPU cores as possible for parallel execution.
|
|
110
|
-
## Functions:
|
|
111
|
-
- **fit** _(X, y, test\_size, showTable=True)_: Fit Classification algorithms to X and y using hold-out, predict and score on test set (test_size).
|
|
112
|
-
If the dimensions of the training vectors are not compatible with the different models, a
|
|
113
|
-
PCA transformation will be used in order to reduce the dimensionality to a compatible space.
|
|
114
|
-
All categories must be in the training data if there are new categories in the test date the
|
|
115
|
-
function will not work. The objective variable must be in a numerical form like LabelEncoder or
|
|
116
|
-
OrdinalEncoder. Onehot or strings won't work.
|
|
117
|
-
- **repeated_cross_validation** _(X, y, n_splits=5, n_repeats=10, showTable=True)_: Perform repeated cross-validation on the given dataset and model.This method splits the dataset into multiple train-test splits using RepeatedStratifiedKFold,
|
|
118
|
-
fits the model on the training set, evaluates it on the validation set, and aggregates the results.
|
|
119
|
-
|
|
120
|
-
- **leave_one_out** _(X, y, showTable=True)_: Perform leave-one-out cross-validation on the given dataset and model. This method splits the dataset into multiple train-test splits using LeaveOneOut,
|
|
121
|
-
fits the model on the training set, evaluates it on the validation set, and aggregates the results.
|
|
122
|
-
|
lazyqml-3.0.5/README copy.md
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# LazyQML
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
[](https://pypi.python.org/pypi/lazyqml)
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
**pLazyQML: A parallel package for efficient execution of QML models on classical computers**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- Free software: MIT License
|
|
11
|
-
## Quantum and High Performance Computing (QHPC) - University of Oviedo
|
|
12
|
-
- José Ranilla Pastor - ranilla@uniovi.es
|
|
13
|
-
- Elías Fernández Combarro - efernandezca@uniovi.es
|
|
14
|
-
- Diego García Vega - diegogarciavega@gmail.com
|
|
15
|
-
- Fernando Álvaro Plou Llorente - ploufernando@uniovi.es
|
|
16
|
-
- Alejandro Leal Castaño - lealcalejandro@uniovi.es
|
|
17
|
-
- Group - https://qhpc.uniovi.es
|
|
18
|
-
|
|
19
|
-
## Parameters:
|
|
20
|
-
- **verbose** _bool, optional (default=False)_: If set to True, detailed messages about the training process will be displayed, helping users to monitor the progress and debug if necessary.
|
|
21
|
-
- **customMetric** _function, optional (default=None)_: A custom evaluation function provided by the user to evaluate the models. This allows the user to define their own metrics tailored to specific requirements.
|
|
22
|
-
- **customImputerNum** _function, optional (default=None)_: A custom function provided by the user to handle the imputation of missing numeric data. This provides flexibility in how missing values are treated in the dataset.
|
|
23
|
-
- **customImputerCat** _function, optional (default=None)_: A custom function provided by the user to handle the imputation of missing categorical data, allowing users to apply their own strategies for handling missing categorical values.
|
|
24
|
-
- **prediction** _bool, optional (default=False)_: If set to True, the predictions made by all the models will be returned as a pandas DataFrame for easy comparison and analysis of different models’ outputs.
|
|
25
|
-
- **classifiers** _set of enums, optional (default={Model.ALL})_: A set specifying which classifiers to train. Options include `{Model.ALL, Model.QSVM, Model.QNN, Model.QNN_BAG}`, enabling the user to select specific quantum classifiers or train all available ones.
|
|
26
|
-
- **embeddings** _set of enums, optional (default={Embedding.ALL})_: A set specifying which embeddings to use for training. Options include `{Embedding.ALL, Embedding.RX, Embedding.RZ, Embedding.RY, Embedding.ZZ, Embedding.AMP}`, allowing the user to choose specific data encodings.
|
|
27
|
-
- **ansatzs** _set of enums, optional (default={Ansatzs.ALL})_: A set specifying which quantum circuit ansatzes to use. Options include `{Ansatzs.ALL, Ansatzs.HCZRX, Ansatzs.TREE_TENSOR, Ansatzs.TWO_LOCAL, Ansatzs.HARDWARE_EFFICIENT}`, giving users the ability to experiment with different quantum circuit structures.
|
|
28
|
-
- **randomState** _int, optional (default=1234)_: An integer seed used to ensure the repeatability of experiments, making the results consistent across different runs.
|
|
29
|
-
- **nqubits** _int, optional (default=8)_: Specifies the number of qubits for the quantum circuits used by the models. This parameter controls the size of the quantum circuits.
|
|
30
|
-
- **numLayers** _int, optional (default=5)_: Indicates the number of layers in the Quantum Neural Network (QNN) models, affecting the depth and potentially the performance of the neural networks.
|
|
31
|
-
- **numPredictors** _int, optional (default=10)_: Specifies the number of different predictors used in Quantum Neural Networks with Bagging (QNN_Bag). This parameter controls the ensemble size in bagging models.
|
|
32
|
-
- **maxSamples** _float, optional (default=1.0)_: A floating point number between 0 and 1.0 indicating the fraction of the dataset to be used for each Quantum Neural Network with Bagging (QNN_Bag).
|
|
33
|
-
- **maxFeatures** _float, optional (default=0.8)_: A floating point number between 0 and 1.0 indicating the fraction of the dataset features to be used for each Quantum Neural Network with Bagging (QNN_Bag).
|
|
34
|
-
- **runs** _int, optional (default=1)_: The number of training runs for the Quantum Neural Network (QNN) models. This parameter determines how many times the model is trained and evaluated.
|
|
35
|
-
- **learningRate** _float, optional (default=0.01)_: The learning rate for the gradient descent optimization process used in all Quantum Neural Networks (QNNs). This controls how much the model's weights are updated during each training step.
|
|
36
|
-
- **epochs** _int, optional (default=100)_: The number of complete passes through the dataset during model fitting. More epochs can allow the model to converge more accurately, though may increase computation time.
|
|
37
|
-
- **backend** _enum, optional (default=Backend.lightningQubit)_: This field controls the acceleration used in the quantum simulator. Supported values are `{Backend.lightningQubit, Backend.lightningGPU, Backend.defaultQubit}`, specifying which backend to use for quantum circuit simulation.
|
|
38
|
-
- **threshold** _int, optional (default=22)_: Integer value used to delimit from which number of qubits the internal operations of the models start to be parallelized. This helps optimize performance for larger quantum circuits.
|
|
39
|
-
- **cores** _int, optional (default=-1)_: Number of processes to be created by the dispatcher to run the selected models. Each process will be allocated as many CPU cores as possible for parallel execution.
|
|
40
|
-
## Functions:
|
|
41
|
-
- **fit** _(X, y, test\_size, showTable=True)_: Fit Classification algorithms to X and y using hold-out, predict and score on test set (test_size).
|
|
42
|
-
If the dimensions of the training vectors are not compatible with the different models, a
|
|
43
|
-
PCA transformation will be used in order to reduce the dimensionality to a compatible space.
|
|
44
|
-
All categories must be in the training data if there are new categories in the test date the
|
|
45
|
-
function will not work. The objective variable must be in a numerical form like LabelEncoder or
|
|
46
|
-
OrdinalEncoder. Onehot or strings won't work.
|
|
47
|
-
- **repeated_cross_validation** _(X, y, n_splits=5, n_repeats=10, showTable=True)_: Perform repeated cross-validation on the given dataset and model.This method splits the dataset into multiple train-test splits using RepeatedStratifiedKFold,
|
|
48
|
-
fits the model on the training set, evaluates it on the validation set, and aggregates the results.
|
|
49
|
-
|
|
50
|
-
- **leave_one_out** _(X, y, showTable=True)_: Perform leave-one-out cross-validation on the given dataset and model. This method splits the dataset into multiple train-test splits using LeaveOneOut,
|
|
51
|
-
fits the model on the training set, evaluates it on the validation set, and aggregates the results.
|
|
52
|
-
## Usage:
|
|
53
|
-
```python
|
|
54
|
-
from lazyqml.lazyqml import QuantumClassifier
|
|
55
|
-
from lazyqml.Global.globalEnums import *
|
|
56
|
-
from sklearn.datasets import load_breast_cancer, load_iris
|
|
57
|
-
from sklearn.model_selection import train_test_split
|
|
58
|
-
# Load data
|
|
59
|
-
data = load_iris()
|
|
60
|
-
X = data.data
|
|
61
|
-
y = data.target
|
|
62
|
-
|
|
63
|
-
# Split data
|
|
64
|
-
X_train, X_test, y_train, y_test = train_test_split(X, y,test_size=.3,random_state =123)
|
|
65
|
-
|
|
66
|
-
# Initialize L azyClass ifier
|
|
67
|
-
classifier = QuantumClassifier(nqubits={4,8,16},verbose=True,sequential=False,backend=Backend.lightningQubit)
|
|
68
|
-
|
|
69
|
-
# Fit and predict
|
|
70
|
-
classifier.fit(X_train=X_train,y_train=y_train,X_test=X_test,y_test=y_test)
|
|
71
|
-
```
|
lazyqml-3.0.5/README.md
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# LazyQML
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
[](https://pypi.python.org/pypi/lazyqml)
|
|
5
|
-

|
|
6
|
-

|
|
7
|
-

|
|
8
|
-

|
|
9
|
-

|
|
10
|
-

|
|
11
|
-
<img src="https://assets.cloud.pennylane.ai/pennylane_website/generic/logo.svg" alt="Pennylane Logo" style="background-color: white; padding: 2px;" />
|
|
12
|
-

|
|
13
|
-
|
|
14
|
-
<!--  -->
|
|
15
|
-
|
|
16
|
-
pLazyQML, a software package designed to accelerate, automate, and streamline experimentation with quantum machine learning models on classical computers. pLazyQML reduces the complexity and time required for developing and testing quantum-enhanced machine learning models.
|
|
17
|
-
## Usage
|
|
18
|
-
```python
|
|
19
|
-
from lazyqml.lazyqml import QuantumClassifier
|
|
20
|
-
from lazyqml.Global.globalEnums import *
|
|
21
|
-
from sklearn.datasets import load_breast_cancer, load_iris
|
|
22
|
-
from sklearn.model_selection import train_test_split
|
|
23
|
-
# Load data
|
|
24
|
-
data = load_iris()
|
|
25
|
-
X = data.data
|
|
26
|
-
y = data.target
|
|
27
|
-
|
|
28
|
-
# Split data
|
|
29
|
-
X_train, X_test, y_train, y_test = train_test_split(X, y,test_size=.3,random_state =123)
|
|
30
|
-
|
|
31
|
-
# Initialize L azyClass ifier
|
|
32
|
-
classifier = QuantumClassifier(nqubits={4,8,16},verbose=True,sequential=False,backend=Backend.lightningQubit)
|
|
33
|
-
|
|
34
|
-
# Fit and predict
|
|
35
|
-
classifier.fit(X_train=X_train,y_train=y_train,X_test=X_test,y_test=y_test)
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## License & Compatibility
|
|
39
|
-
- Free software: MIT License
|
|
40
|
-
- This Python package is only compatible with Linux systems.
|
|
41
|
-
- Hardware acceleration is only enabled using CUDA-compatible devices.
|
|
42
|
-
## Quantum and High Performance Computing (QHPC) - University of Oviedo
|
|
43
|
-
- José Ranilla Pastor - ranilla@uniovi.es
|
|
44
|
-
- Elías Fernández Combarro - efernandezca@uniovi.es
|
|
45
|
-
- Diego García Vega - diegogarciavega@gmail.com
|
|
46
|
-
- Fernando Álvaro Plou Llorente - ploufernando@uniovi.es
|
|
47
|
-
- Alejandro Leal Castaño - lealcalejandro@uniovi.es
|
|
48
|
-
- Group - https://qhpc.uniovi.es
|
|
49
|
-
|
|
50
|
-
## Parameters:
|
|
51
|
-
- **verbose** _bool, optional (default=False)_: If set to True, detailed messages about the training process will be displayed, helping users to monitor the progress and debug if necessary.
|
|
52
|
-
- **customMetric** _function, optional (default=None)_: A custom evaluation function provided by the user to evaluate the models. This allows the user to define their own metrics tailored to specific requirements.
|
|
53
|
-
- **customImputerNum** _function, optional (default=None)_: A custom function provided by the user to handle the imputation of missing numeric data. This provides flexibility in how missing values are treated in the dataset.
|
|
54
|
-
- **customImputerCat** _function, optional (default=None)_: A custom function provided by the user to handle the imputation of missing categorical data, allowing users to apply their own strategies for handling missing categorical values.
|
|
55
|
-
- **prediction** _bool, optional (default=False)_: If set to True, the predictions made by all the models will be returned as a pandas DataFrame for easy comparison and analysis of different models’ outputs.
|
|
56
|
-
- **classifiers** _set of enums, optional (default={Model.ALL})_: A set specifying which classifiers to train. Options include `{Model.ALL, Model.QSVM, Model.QNN, Model.QNN_BAG}`, enabling the user to select specific quantum classifiers or train all available ones.
|
|
57
|
-
- **embeddings** _set of enums, optional (default={Embedding.ALL})_: A set specifying which embeddings to use for training. Options include `{Embedding.ALL, Embedding.RX, Embedding.RZ, Embedding.RY, Embedding.ZZ, Embedding.AMP}`, allowing the user to choose specific data encodings.
|
|
58
|
-
- **ansatzs** _set of enums, optional (default={Ansatzs.ALL})_: A set specifying which quantum circuit ansatzes to use. Options include `{Ansatzs.ALL, Ansatzs.HCZRX, Ansatzs.TREE_TENSOR, Ansatzs.TWO_LOCAL, Ansatzs.HARDWARE_EFFICIENT}`, giving users the ability to experiment with different quantum circuit structures.
|
|
59
|
-
- **randomState** _int, optional (default=1234)_: An integer seed used to ensure the repeatability of experiments, making the results consistent across different runs.
|
|
60
|
-
- **nqubits** _int, optional (default=8)_: Specifies the number of qubits for the quantum circuits used by the models. This parameter controls the size of the quantum circuits.
|
|
61
|
-
- **numLayers** _int, optional (default=5)_: Indicates the number of layers in the Quantum Neural Network (QNN) models, affecting the depth and potentially the performance of the neural networks.
|
|
62
|
-
- **numPredictors** _int, optional (default=10)_: Specifies the number of different predictors used in Quantum Neural Networks with Bagging (QNN_Bag). This parameter controls the ensemble size in bagging models.
|
|
63
|
-
- **maxSamples** _float, optional (default=1.0)_: A floating point number between 0 and 1.0 indicating the fraction of the dataset to be used for each Quantum Neural Network with Bagging (QNN_Bag).
|
|
64
|
-
- **maxFeatures** _float, optional (default=0.8)_: A floating point number between 0 and 1.0 indicating the fraction of the dataset features to be used for each Quantum Neural Network with Bagging (QNN_Bag).
|
|
65
|
-
- **runs** _int, optional (default=1)_: The number of training runs for the Quantum Neural Network (QNN) models. This parameter determines how many times the model is trained and evaluated.
|
|
66
|
-
- **learningRate** _float, optional (default=0.01)_: The learning rate for the gradient descent optimization process used in all Quantum Neural Networks (QNNs). This controls how much the model's weights are updated during each training step.
|
|
67
|
-
- **epochs** _int, optional (default=100)_: The number of complete passes through the dataset during model fitting. More epochs can allow the model to converge more accurately, though may increase computation time.
|
|
68
|
-
- **backend** _enum, optional (default=Backend.lightningQubit)_: This field controls the acceleration used in the quantum simulator. Supported values are `{Backend.lightningQubit, Backend.lightningGPU, Backend.defaultQubit}`, specifying which backend to use for quantum circuit simulation.
|
|
69
|
-
- **threshold** _int, optional (default=22)_: Integer value used to delimit from which number of qubits the internal operations of the models start to be parallelized. This helps optimize performance for larger quantum circuits.
|
|
70
|
-
- **cores** _int, optional (default=-1)_: Number of processes to be created by the dispatcher to run the selected models. Each process will be allocated as many CPU cores as possible for parallel execution.
|
|
71
|
-
## Functions:
|
|
72
|
-
- **fit** _(X, y, test\_size, showTable=True)_: Fit Classification algorithms to X and y using hold-out, predict and score on test set (test_size).
|
|
73
|
-
If the dimensions of the training vectors are not compatible with the different models, a
|
|
74
|
-
PCA transformation will be used in order to reduce the dimensionality to a compatible space.
|
|
75
|
-
All categories must be in the training data if there are new categories in the test date the
|
|
76
|
-
function will not work. The objective variable must be in a numerical form like LabelEncoder or
|
|
77
|
-
OrdinalEncoder. Onehot or strings won't work.
|
|
78
|
-
- **repeated_cross_validation** _(X, y, n_splits=5, n_repeats=10, showTable=True)_: Perform repeated cross-validation on the given dataset and model.This method splits the dataset into multiple train-test splits using RepeatedStratifiedKFold,
|
|
79
|
-
fits the model on the training set, evaluates it on the validation set, and aggregates the results.
|
|
80
|
-
|
|
81
|
-
- **leave_one_out** _(X, y, showTable=True)_: Perform leave-one-out cross-validation on the given dataset and model. This method splits the dataset into multiple train-test splits using LeaveOneOut,
|
|
82
|
-
fits the model on the training set, evaluates it on the validation set, and aggregates the results.
|
|
83
|
-
|
lazyqml-3.0.5/docs/common.md
DELETED
lazyqml-3.0.5/docs/lazyqml.md
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: lazyqml
|
|
3
|
-
Version: 3.0.5
|
|
4
|
-
Summary: LazyQML benchmarking utility to test quantum machine learning models.
|
|
5
|
-
Author-email: QHPC Group <qhpcgroup@gmail.com>
|
|
6
|
-
License: MIT License
|
|
7
|
-
Project-URL: Homepage, https://github.com/QHPC-SP-Research-Lab/LazyQML
|
|
8
|
-
Keywords: lazyqml
|
|
9
|
-
Classifier: Intended Audience :: Science/Research
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Natural Language :: English
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
-
Requires-Python: >=3.9
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
License-File: LICENSE
|
|
16
|
-
License-File: LICENSE copy
|
|
17
|
-
License-File: AUTHORS.rst
|
|
18
|
-
Requires-Dist: wheel
|
|
19
|
-
Requires-Dist: tabulate
|
|
20
|
-
Requires-Dist: torch
|
|
21
|
-
Requires-Dist: torchaudio
|
|
22
|
-
Requires-Dist: torchvision
|
|
23
|
-
Requires-Dist: scipy
|
|
24
|
-
Requires-Dist: scikit-learn
|
|
25
|
-
Requires-Dist: PennyLane
|
|
26
|
-
Requires-Dist: PennyLane_Lightning
|
|
27
|
-
Requires-Dist: PennyLane_Lightning_GPU
|
|
28
|
-
Requires-Dist: custatevec_cu12
|
|
29
|
-
Requires-Dist: ucimlrepo
|
|
30
|
-
Requires-Dist: pydantic
|
|
31
|
-
Requires-Dist: psutil
|
|
32
|
-
Requires-Dist: pandas
|
|
33
|
-
Requires-Dist: joblib
|
|
34
|
-
Requires-Dist: gputil
|
|
35
|
-
Provides-Extra: all
|
|
36
|
-
Requires-Dist: lazyqml[extra]; extra == "all"
|
|
37
|
-
Provides-Extra: extra
|
|
38
|
-
Requires-Dist: pandas; extra == "extra"
|
|
39
|
-
|
|
40
|
-
# LazyQML
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
[](https://pypi.python.org/pypi/lazyqml)
|
|
44
|
-

|
|
45
|
-

|
|
46
|
-

|
|
47
|
-

|
|
48
|
-

|
|
49
|
-

|
|
50
|
-
<img src="https://assets.cloud.pennylane.ai/pennylane_website/generic/logo.svg" alt="Pennylane Logo" style="background-color: white; padding: 2px;" />
|
|
51
|
-

|
|
52
|
-
|
|
53
|
-
<!--  -->
|
|
54
|
-
|
|
55
|
-
pLazyQML, a software package designed to accelerate, automate, and streamline experimentation with quantum machine learning models on classical computers. pLazyQML reduces the complexity and time required for developing and testing quantum-enhanced machine learning models.
|
|
56
|
-
## Usage
|
|
57
|
-
```python
|
|
58
|
-
from lazyqml.lazyqml import QuantumClassifier
|
|
59
|
-
from lazyqml.Global.globalEnums import *
|
|
60
|
-
from sklearn.datasets import load_breast_cancer, load_iris
|
|
61
|
-
from sklearn.model_selection import train_test_split
|
|
62
|
-
# Load data
|
|
63
|
-
data = load_iris()
|
|
64
|
-
X = data.data
|
|
65
|
-
y = data.target
|
|
66
|
-
|
|
67
|
-
# Split data
|
|
68
|
-
X_train, X_test, y_train, y_test = train_test_split(X, y,test_size=.3,random_state =123)
|
|
69
|
-
|
|
70
|
-
# Initialize L azyClass ifier
|
|
71
|
-
classifier = QuantumClassifier(nqubits={4,8,16},verbose=True,sequential=False,backend=Backend.lightningQubit)
|
|
72
|
-
|
|
73
|
-
# Fit and predict
|
|
74
|
-
classifier.fit(X_train=X_train,y_train=y_train,X_test=X_test,y_test=y_test)
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## License & Compatibility
|
|
78
|
-
- Free software: MIT License
|
|
79
|
-
- This Python package is only compatible with Linux systems.
|
|
80
|
-
- Hardware acceleration is only enabled using CUDA-compatible devices.
|
|
81
|
-
## Quantum and High Performance Computing (QHPC) - University of Oviedo
|
|
82
|
-
- José Ranilla Pastor - ranilla@uniovi.es
|
|
83
|
-
- Elías Fernández Combarro - efernandezca@uniovi.es
|
|
84
|
-
- Diego García Vega - diegogarciavega@gmail.com
|
|
85
|
-
- Fernando Álvaro Plou Llorente - ploufernando@uniovi.es
|
|
86
|
-
- Alejandro Leal Castaño - lealcalejandro@uniovi.es
|
|
87
|
-
- Group - https://qhpc.uniovi.es
|
|
88
|
-
|
|
89
|
-
## Parameters:
|
|
90
|
-
- **verbose** _bool, optional (default=False)_: If set to True, detailed messages about the training process will be displayed, helping users to monitor the progress and debug if necessary.
|
|
91
|
-
- **customMetric** _function, optional (default=None)_: A custom evaluation function provided by the user to evaluate the models. This allows the user to define their own metrics tailored to specific requirements.
|
|
92
|
-
- **customImputerNum** _function, optional (default=None)_: A custom function provided by the user to handle the imputation of missing numeric data. This provides flexibility in how missing values are treated in the dataset.
|
|
93
|
-
- **customImputerCat** _function, optional (default=None)_: A custom function provided by the user to handle the imputation of missing categorical data, allowing users to apply their own strategies for handling missing categorical values.
|
|
94
|
-
- **prediction** _bool, optional (default=False)_: If set to True, the predictions made by all the models will be returned as a pandas DataFrame for easy comparison and analysis of different models’ outputs.
|
|
95
|
-
- **classifiers** _set of enums, optional (default={Model.ALL})_: A set specifying which classifiers to train. Options include `{Model.ALL, Model.QSVM, Model.QNN, Model.QNN_BAG}`, enabling the user to select specific quantum classifiers or train all available ones.
|
|
96
|
-
- **embeddings** _set of enums, optional (default={Embedding.ALL})_: A set specifying which embeddings to use for training. Options include `{Embedding.ALL, Embedding.RX, Embedding.RZ, Embedding.RY, Embedding.ZZ, Embedding.AMP}`, allowing the user to choose specific data encodings.
|
|
97
|
-
- **ansatzs** _set of enums, optional (default={Ansatzs.ALL})_: A set specifying which quantum circuit ansatzes to use. Options include `{Ansatzs.ALL, Ansatzs.HCZRX, Ansatzs.TREE_TENSOR, Ansatzs.TWO_LOCAL, Ansatzs.HARDWARE_EFFICIENT}`, giving users the ability to experiment with different quantum circuit structures.
|
|
98
|
-
- **randomState** _int, optional (default=1234)_: An integer seed used to ensure the repeatability of experiments, making the results consistent across different runs.
|
|
99
|
-
- **nqubits** _int, optional (default=8)_: Specifies the number of qubits for the quantum circuits used by the models. This parameter controls the size of the quantum circuits.
|
|
100
|
-
- **numLayers** _int, optional (default=5)_: Indicates the number of layers in the Quantum Neural Network (QNN) models, affecting the depth and potentially the performance of the neural networks.
|
|
101
|
-
- **numPredictors** _int, optional (default=10)_: Specifies the number of different predictors used in Quantum Neural Networks with Bagging (QNN_Bag). This parameter controls the ensemble size in bagging models.
|
|
102
|
-
- **maxSamples** _float, optional (default=1.0)_: A floating point number between 0 and 1.0 indicating the fraction of the dataset to be used for each Quantum Neural Network with Bagging (QNN_Bag).
|
|
103
|
-
- **maxFeatures** _float, optional (default=0.8)_: A floating point number between 0 and 1.0 indicating the fraction of the dataset features to be used for each Quantum Neural Network with Bagging (QNN_Bag).
|
|
104
|
-
- **runs** _int, optional (default=1)_: The number of training runs for the Quantum Neural Network (QNN) models. This parameter determines how many times the model is trained and evaluated.
|
|
105
|
-
- **learningRate** _float, optional (default=0.01)_: The learning rate for the gradient descent optimization process used in all Quantum Neural Networks (QNNs). This controls how much the model's weights are updated during each training step.
|
|
106
|
-
- **epochs** _int, optional (default=100)_: The number of complete passes through the dataset during model fitting. More epochs can allow the model to converge more accurately, though may increase computation time.
|
|
107
|
-
- **backend** _enum, optional (default=Backend.lightningQubit)_: This field controls the acceleration used in the quantum simulator. Supported values are `{Backend.lightningQubit, Backend.lightningGPU, Backend.defaultQubit}`, specifying which backend to use for quantum circuit simulation.
|
|
108
|
-
- **threshold** _int, optional (default=22)_: Integer value used to delimit from which number of qubits the internal operations of the models start to be parallelized. This helps optimize performance for larger quantum circuits.
|
|
109
|
-
- **cores** _int, optional (default=-1)_: Number of processes to be created by the dispatcher to run the selected models. Each process will be allocated as many CPU cores as possible for parallel execution.
|
|
110
|
-
## Functions:
|
|
111
|
-
- **fit** _(X, y, test\_size, showTable=True)_: Fit Classification algorithms to X and y using hold-out, predict and score on test set (test_size).
|
|
112
|
-
If the dimensions of the training vectors are not compatible with the different models, a
|
|
113
|
-
PCA transformation will be used in order to reduce the dimensionality to a compatible space.
|
|
114
|
-
All categories must be in the training data if there are new categories in the test date the
|
|
115
|
-
function will not work. The objective variable must be in a numerical form like LabelEncoder or
|
|
116
|
-
OrdinalEncoder. Onehot or strings won't work.
|
|
117
|
-
- **repeated_cross_validation** _(X, y, n_splits=5, n_repeats=10, showTable=True)_: Perform repeated cross-validation on the given dataset and model.This method splits the dataset into multiple train-test splits using RepeatedStratifiedKFold,
|
|
118
|
-
fits the model on the training set, evaluates it on the validation set, and aggregates the results.
|
|
119
|
-
|
|
120
|
-
- **leave_one_out** _(X, y, showTable=True)_: Perform leave-one-out cross-validation on the given dataset and model. This method splits the dataset into multiple train-test splits using LeaveOneOut,
|
|
121
|
-
fits the model on the training set, evaluates it on the validation set, and aggregates the results.
|
|
122
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lazyqml-3.0.5/lazyqml/Factories → lazyqml-3.1.0/lazyqml/Factories/Preprocessing}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|