Introduction to pyRiemann-qiskit¶
Literature on quantum computing suggests it may offer an advantage as compared with classical computing in terms of computational time and outcomes, such as for pattern recognition or when using limited training sets [1] [2].
A ubiquitous library on quantum computing is Qiskit [3]. Qiskit is an IBM library distributed under Apache 2.0 which provides both quantum algorithms and backends. A backend can be either your local machine or a remote machine, which one can emulates or be a quantum machine. Qiskit abstraction over the type of machine you want to use, make designing quantum algorithm seamless.
Qiskit implements a quantum version of support vector -like classifiers, known as quantum-enhanced support vector classifier (QSVC) and variational quantum classifier (VQC) [4]. These classifiers likely offer an advantage over classical SVM in situations where the classification task is complex. Task complexity is raised by the encoding of the data into a quantum state, the number of available data and the quality of the data. An initial study is available in [5], and it can be downloaded from here. Although there is no study on this topic at the time of writing, this could be an interesting research direction to investigate BCI illiteracy.
pyRiemann-qiskit implements a wrapper around QSVC and VQC, to use quantum classification with Riemannian geometry. A use case would be to use vectorized covariance matrices in the TangentSpace as an input for these classifiers, enabling a possible sandbox for researchers and engineers in the field. pyRiemann-qiskit also introduces a quantum version of the famous MDM algorithm.
Quantum drawbacks¶
Limitation of the feature dimension
The number of qubits (and therefore the feature dimension) is limited to:
~36 (depends on system memory size) on a local quantum simulator, and up to:
5000 on a remote quantum simulator;
7 on free real quantum computers, and up to:
127 on exploratory quantum computers (not available for public use).
Time complexity
A higher number of trials or dimension increases time to completion of the quantum algorithm, especially when running on a local machine. This is why the number of trials is limited in the examples we provided. However, you should avoid such practices in your own analysis.
Although these aspects are less important in a remote backend, it may happen that the quantum algorithm is queued depending on the number of concurrent users.
For all these aspects, the use of pyRiemann-qiskit should be limited to offline analysis only.
References¶
How to cite?¶
Anton Andreev, Grégoire Cattan, Sylvain Chevallier, and Quentin Barthélemy. ‘pyRiemann-qiskit: A Sandbox for Quantum Classification Experiments with Riemannian Geometry’. Research Ideas and Outcomes 9 (20 March 2023). https://doi.org/10.3897/rio.9.e101006.