Skip to content

Commit a15f3bb

Browse files
fix docs (#296)
1 parent 241bdfd commit a15f3bb

9 files changed

Lines changed: 20 additions & 26 deletions

File tree

.github/workflows/doc_checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ jobs:
1616
- uses: sQUlearn/sphinx-action@master
1717
with:
1818
docs-folder: "docs/"
19-
pre-build-command: "pip3 install ."
19+
pre-build-command: "pip3 install .[docs]"
2020
build-command: "sphinx-build -b html . _build -W --keep-going"

.github/workflows/publish_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: sQUlearn/sphinx-action@master
2525
with:
2626
docs-folder: "docs/"
27-
pre-build-command: "pip3 install ."
27+
pre-build-command: "pip3 install .[docs]"
2828
build-command: "sphinx-build -b html . _build -W"
2929
- name: Commit Files
3030
run: |

docs/requirements.txt

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

examples/tutorials/qnn_backend_mitigation.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"\n",
99
"### Introduction\n",
1010
"\n",
11-
"This tutorial demonstrates the setup and implementation of error mitigation techniques for Qiskit's primitives within the context of Quantum Neural Networks (QNNs) in sQUlearn. Firstly, we will train a small QNN using a noise-free and error-free simulator to fit a parabolic dataset. Subsequently, we will illustrate how to configure the `Executor` class to establish a connection with IBM Quantum devices. We assume that you have already set up an IBM account and have access to IBM Quantum devices. For detailed instructions on registering and configuring your IBM Quantum account, please refer to the following link: [IBM Quantum Account Management](https://qiskit.org/ecosystem/ibm-runtime/how_to/account-management.html).\n",
11+
"This tutorial demonstrates the setup and implementation of error mitigation techniques for Qiskit's primitives within the context of Quantum Neural Networks (QNNs) in sQUlearn. Firstly, we will train a small QNN using a noise-free and error-free simulator to fit a parabolic data set. Subsequently, we will illustrate how to configure the `Executor` class to establish a connection with IBM Quantum devices. We assume that you have already set up an IBM account and have access to IBM Quantum devices. For detailed instructions on registering and configuring your IBM Quantum account, please refer to the following link: [IBM Quantum Account Management](https://qiskit.org/ecosystem/ibm-runtime/how_to/account-management.html).\n",
1212
"\n",
1313
"Given the potentially lengthy queuing times for the free quantum devices, we will replicate the noise model of a quantum device and use the QASM simulator to emulate the real characteristics of a quantum computer. The simulator employed in this task, known as the `ibmq_qasm_simulator`, operates within the IBM Quantum cloud and can be accessed similarly to the actual quantum devices.\n",
1414
"\n",

pyproject.toml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,9 @@ dynamic = ["version", "description"]
4545
dev = [
4646
"black",
4747
"flit",
48-
"myst-parser",
4948
"nbmake",
50-
"nbsphinx",
51-
"nbsphinx_link",
5249
"pylint",
5350
"pytest",
54-
"sphinx",
55-
"sphinxcontrib-spelling",
56-
"sphinx-rtd-theme",
57-
"sphinx-sitemap",
58-
"jupyter-sphinx",
5951
]
6052
examples = [
6153
"jupyter",
@@ -66,6 +58,19 @@ examples = [
6658
"seaborn",
6759
"scikit-optimize",
6860
]
61+
docs = [
62+
"ipykernel",
63+
"matplotlib>=3.5",
64+
"myst-parser",
65+
"nbsphinx",
66+
"nbsphinx_link",
67+
"pylatexenc>=2.10",
68+
"sphinx",
69+
"sphinxcontrib-spelling",
70+
"sphinx-rtd-theme<3.0.0",
71+
"sphinx-sitemap",
72+
"jupyter-sphinx",
73+
]
6974

7075
[project.urls]
7176
Homepage = "https://github.com/sQUlearn/squlearn"

src/squlearn/encoding_circuit/pruned_encoding_circuit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def automated_pruning(
179179
verbose: int = 1,
180180
seed: Union[int, None] = None,
181181
) -> PrunedEncodingCircuit:
182-
"""
182+
r"""
183183
Function for automated pruning of the parameters in the inputted parameterized quantum circuit.
184184
185185
The algorithms for the automated pruning is based on

src/squlearn/kernel/matrix/projected_quantum_kernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ def _set_outer_kernel(self, outer_kernel: Union[str, OuterKernelBase], **kwargs)
866866

867867

868868
class GaussianOuterKernel(OuterKernelBase):
869-
"""
869+
r"""
870870
Implementation of the Gaussian outer kernel:
871871
872872
.. math::

src/squlearn/kernel/ml/qkrr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
class QKRR(BaseEstimator, RegressorMixin):
14-
"""
14+
r"""
1515
Quantum Kernel Ridge Regression.
1616
1717
This class implements the Quantum Kernel Ridge Regression analogous to KRR [1] in scikit-learn

src/squlearn/util/executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,7 @@ def observables(self):
16041604

16051605
@property
16061606
def parameters(self):
1607-
"""Parameters of the quantum circuits.
1607+
r"""Parameters of the quantum circuits.
16081608
16091609
Returns:
16101610
Parameters, where ``parameters[i][j]`` is the j-\ :spelling:word:`th` parameter of the

0 commit comments

Comments
 (0)