Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Sep 29, 2024
1 parent 0a6d6ed commit cb70764
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ To use symbolic quantum simulation, run:
pip install .[optim]
```

Which will enable [qiskit-symb](https://github.com/SimoneGasperini/qiskit-symb) integration.
Which will enable [qiskit-symb](https://github.com/SimoneGasperini/qiskit-symb)
integration.

Note, Qiskit only provide binaries for Linux. For other platforms, or if you want to
enable specific NVIDIA optimization for quantum, you need to build the binary
Expand Down
2 changes: 1 addition & 1 deletion pyriemann_qiskit/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def _init_algo(self, n_features):
self.gen_feature_map,
self._quantum_instance,
self.use_fidelity_state_vector_kernel,
not self.pegasos
not self.pegasos,
)
if self.pegasos:
self._log("[Warning] `gamma` is not supported by PegasosQSVC")
Expand Down
11 changes: 6 additions & 5 deletions pyriemann_qiskit/utils/quantum_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
FidelityStatevectorKernel,
FidelityQuantumKernel,
)

try:
from qiskit_symb.quantum_info import Statevector
QISKIT_SYMB=True
except:
QISKIT_SYMB=False

QISKIT_SYMB = True
except:
QISKIT_SYMB = False


class SymbFidelityStatevectorKernel:
Expand Down Expand Up @@ -218,14 +219,14 @@ def get_quantum_kernel(
gen_feature_map,
quantum_instance,
use_fidelity_state_vector_kernel,
use_qiskit_symb
use_qiskit_symb,
):
"""Get a quantum kernel
Return an instance of FidelityQuantumKernel or
FidelityStatevectorKernel (in the case of a simulation).
For simulation with a small number of qubits (< 9), and `use_qiskit_symb` is True,
For simulation with a small number of qubits (< 9), and `use_qiskit_symb` is True,
qiskit-symb is used.
Parameters
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ docplex>=2.21.207
firebase_admin==6.5.0
tqdm
pandas

0 comments on commit cb70764

Please sign in to comment.