Skip to content

Conversation

@adekusar-drl
Copy link
Collaborator

@adekusar-drl adekusar-drl commented Oct 28, 2022

Summary

This PR updates the QNN related tutorials to the new implementations, SamplerQNN and EstimatorQNN accordingly. There are no intentions to improve the tutorials in the PR, but rather update them. Some features, e.g. sampling and sparse support are excluded as they are either not yet available or not demonstrable on the reference implementation.

Details and comments

Updated:

  • 01_neural_networks
  • 02_neural_network_classifier_and_regressor
  • 02a_training_a_quantum_model_on_a_real_dataset
  • 05_torch_connector
  • 09_saving_and_loading_models
  • 11_quantum_convolutional_neural_networks

The effective dimension tutorial is updated in a separate PR: #507

To be merged after #436, #470.

# Conflicts:
#	qiskit_machine_learning/neural_networks/__init__.py
#	test/connectors/test_torch_networks.py
@adekusar-drl adekusar-drl added the on hold 🛑 Can not fix yet label Oct 28, 2022
 into updated_tutorials

� Conflicts:
�	qiskit_machine_learning/neural_networks/__init__.py
�	qiskit_machine_learning/neural_networks/estimator_qnn.py
�	test/connectors/test_torch_networks.py
@adekusar-drl adekusar-drl added this to the 0.5.0 milestone Nov 1, 2022
@adekusar-drl adekusar-drl changed the title [WIP]Updated tutorials [WIP] Updated tutorials Nov 1, 2022
 into updated_tutorials

� Conflicts:
�	qiskit_machine_learning/algorithms/classifiers/vqc.py
�	qiskit_machine_learning/neural_networks/sampler_qnn.py
�	releasenotes/notes/add-sampler-qnn-a093431afc1c5441.yaml
�	test/algorithms/classifiers/test_vqc.py
�	test/neural_networks/test_circuit_vs_sampler_qnn.py
�	test/neural_networks/test_sampler_qnn.py
@adekusar-drl adekusar-drl removed the on hold 🛑 Can not fix yet label Nov 2, 2022
@adekusar-drl adekusar-drl marked this pull request as ready for review November 2, 2022 13:14
@adekusar-drl adekusar-drl changed the title [WIP] Updated tutorials Updated tutorials Nov 2, 2022
@coveralls
Copy link

Pull Request Test Coverage Report for Build 3390426063

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.08%) to 88.853%

Files with Coverage Reduction New Missed Lines %
qiskit_machine_learning/datasets/gaussian.py 3 37.11%
Totals Coverage Status
Change from base Build 3388873691: -0.08%
Covered Lines: 3539
Relevant Lines: 3983

💛 - Coveralls

@adekusar-drl adekusar-drl merged commit 40f99bb into qiskit-community:main Nov 4, 2022
@adekusar-drl adekusar-drl deleted the new_qnns branch November 4, 2022 14:04
oscar-wallis pushed a commit that referenced this pull request Feb 16, 2024
* Add primitives branch to CI workflow

* added pocs

* init fixed

* more init

* Add qnns PoC

* Establish qnn branch

* Add fwd unit test

* Refactor sampler qnn

* Undo kernel changes

* Start adding new type hint style

* Move to neural_networks

* Runnable tests

* wip estimator qnn

* wip

* added estimator qnn

* wip added unittests

* added unittests

* reno

* fix reno

* support estimator qnn in two_layer_qnn

* Update typehints, refactor

* Add new unittests, fix code

* Add gradient unit test

* Add torch tests

* Remove unwanted change circuitQNN

* Remove utils

* Fix style, lint

* Add VQC

* Fix mypy

* fix mypy

* fix mypy

* fix mypy

* Restore workflow

* Restore workflow

* Update .github/workflows/main.yml

* Fix mypy

* Fix CI (hopefully)

* Update requirements

* Add sparse support

* Fix style etc

* Add type ignore

* Fix style?

* skip test if not sparse

* Add type ignore

* Fix mypy

* Make keyword args

* Make keyword args

* Apply review comments

* Fix tests, final refactor, add docstring

* Add Sampler QNN

* Update qiskit_machine_learning/algorithms/classifiers/vqc.py

Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>

* updated

* Apply reviews vqc

* Apply reviews

* Fix neko test

* Fix spell check

* make codes simpler with numpy

* fix two_layer_qnn.py

* wip unittests

* update vqr

* fix pylint

* use kwargs

* simplify reno code block

* refactorings

* unit tests, reno, spelling

* vqr properties test

* vectorize forward post processing

* some refactorings

* Update qiskit_machine_learning/algorithms/regressors/vqr.py

Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>

* Update qiskit_machine_learning/algorithms/regressors/vqr.py

Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>

* Update qiskit_machine_learning/algorithms/regressors/vqr.py

Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>

* docstrings

* added more unittests

* Update releasenotes/notes/add-estimator-qnn-270b31662988bef9.yaml

Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>

* code review

* updated

* fix lint

* fix

* fix spelling mistake

* fix backward pass with no weight params

* fix

* Update qiskit_machine_learning/neural_networks/sampler_qnn.py

* reflected comments

* fix spell

* Add try-catch

* fix

* add torch tests

* convert two first tutorials

* update 02a

* update 05

* update 05

* update 09

* update 11

* code review

* update qcnn

* fix spell

Co-authored-by: Manoel Marques <manoel.marques@ibm.com>
Co-authored-by: Gian Gentinetta <gian.gentinetta@gmx.ch>
Co-authored-by: ElePT <epenatap@gmail.com>
Co-authored-by: ElePT <57907331+ElePT@users.noreply.github.com>
Co-authored-by: a-matsuo <MATSUOA@jp.ibm.com>
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants