Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal : Quantum Autoencoder #280

Merged
merged 30 commits into from
May 24, 2024
Merged

Proposal : Quantum Autoencoder #280

merged 30 commits into from
May 24, 2024

Conversation

gcattan
Copy link
Collaborator

@gcattan gcattan commented May 17, 2024

This is a quantum autoencoder, that we transformed into a sklearn transformer.

The example illustrates a possible pipeline with RG.

This is an early research, there are no positive results, and there is a lot of parameters to consider (type of the optimizer, latent space/trash space, component selections, etc.).

Yet, I found it is well in the scope of this library.

* add autoencoder based on qiskit-ml example: https://qiskit.org/ecosystem/machine-learning/tutorials/12_quantum_autoencoder.html
turned to be compatible with scikit-learn

* set up example with autoencoder.
Works with qiskit ml 0.7.1

* add dataset from https://zenodo.org/records/5055046 (partially implemented)

* change localisation of the dataset.
adapt exapmle to use the ergonomic dataset

* apply denoising on raw signal

* reduce epoch dimension
use cross session evaluation

* update pipeline

* update optimizer

* add rs and fix some bugs

* add epochselectchannel

* doc

* improve code for channel selection

* expose qaoa optimizer

* push example

* [pre-commit.ci] auto fixes from pre-commit.com hooks

* typo in example

* fix Attributes section duplicated

* use moabb Hinss2021

* autoencoder.py

Co-authored-by: Yash Chauhan <116367139+jiggychauhi@users.noreply.github.com>
Co-authored-by: Ahmed Mostafa <121709141+AhmedMostafa167@users.noreply.github.com>

* refactor autoencoder, add documentation

* Complete documentation

* extract devectorizer to preprocessing.py WIP

* documentation for devectorizer

* complete doc for EpochSelectChannel

* refactor qword example. Do not use xDawn.

* fix bug with spatial filter

* add callback parameter

* [pre-commit.ci] auto fixes from pre-commit.com hooks

* typo

* flake8

* [pre-commit.ci] auto fixes from pre-commit.com hooks

* typo

* flake8

* [pre-commit.ci] auto fixes from pre-commit.com hooks

---------

Co-authored-by: Gregoire Cattan <gregoire.cattan@ibm.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yash Chauhan <116367139+jiggychauhi@users.noreply.github.com>
Co-authored-by: Ahmed Mostafa <121709141+AhmedMostafa167@users.noreply.github.com>
@gcattan gcattan requested a review from qbarthelemy May 17, 2024 19:52
examples/ERP/autoencoders_example.py Outdated Show resolved Hide resolved
examples/ERP/autoencoders_example.py Outdated Show resolved Hide resolved
examples/ERP/autoencoders_example.py Outdated Show resolved Hide resolved
pyriemann_qiskit/autoencoders.py Outdated Show resolved Hide resolved
pyriemann_qiskit/autoencoders.py Outdated Show resolved Hide resolved
pyriemann_qiskit/utils/preprocessing.py Show resolved Hide resolved
pyriemann_qiskit/utils/preprocessing.py Outdated Show resolved Hide resolved
pyriemann_qiskit/utils/preprocessing.py Outdated Show resolved Hide resolved
pyriemann_qiskit/utils/preprocessing.py Outdated Show resolved Hide resolved
pyriemann_qiskit/autoencoders.py Outdated Show resolved Hide resolved
gcattan and others added 25 commits May 23, 2024 10:39
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Copy link
Member

@qbarthelemy qbarthelemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments. Thx @gcattan !

pyriemann_qiskit/utils/filtering.py Outdated Show resolved Hide resolved
pyriemann_qiskit/autoencoders.py Outdated Show resolved Hide resolved
pyriemann_qiskit/autoencoders.py Outdated Show resolved Hide resolved
pyriemann_qiskit/utils/filtering.py Outdated Show resolved Hide resolved
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
gcattan and others added 3 commits May 24, 2024 15:05
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
@gcattan gcattan merged commit e595da4 into pyRiemann:main May 24, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants