Skip to content

Conversation

@a-matsuo
Copy link
Contributor

@a-matsuo a-matsuo commented Sep 14, 2022

Summary

This PR introduce a new NeuralNetwork class, EsitmatorQNN, that uses the Estimator primitive inside.

  • unittests

close #401

Details and comments

@a-matsuo a-matsuo changed the title [WIP] Add EstimatorQNN class using terra primitives Add EstimatorQNN class using terra primitives Sep 21, 2022
@coveralls
Copy link

coveralls commented Sep 21, 2022

Pull Request Test Coverage Report for Build 3357361719

  • 135 of 139 (97.12%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.4%) to 88.851%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_machine_learning/neural_networks/estimator_qnn.py 100 104 96.15%
Totals Coverage Status
Change from base Build 3340802279: 0.4%
Covered Lines: 3411
Relevant Lines: 3839

💛 - Coveralls

@a-matsuo a-matsuo marked this pull request as ready for review October 5, 2022 01:14
Copy link
Collaborator

@adekusar-drl adekusar-drl left a comment

Choose a reason for hiding this comment

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

Thanks, I have run a first pass of the code review.
Can you please:

  • Update VQR to make use of EstimatorQNN.
  • Update the tests for VQR.
  • If you find that VQR does not really need TwoLayerQNN, then maybe it is easier to deprecate TwoLayerQNN instead of updating it.
  • Depending on the previous outcome: add tests for TwoLayerQNN when both branches (old and new) of the code are tested.

@woodsp-ibm woodsp-ibm added this to the 0.5.0 milestone Oct 13, 2022
@a-matsuo
Copy link
Contributor Author

Thank you @woodsp-ibm! I reflected your comments.

This was referenced Oct 28, 2022
@adekusar-drl adekusar-drl merged commit 670bc12 into qiskit-community:main Oct 31, 2022
oscar-wallis pushed a commit that referenced this pull request Feb 16, 2024
* wip estimator qnn

* wip

* added estimator qnn

* wip added unittests

* added unittests

* reno

* fix reno

* support estimator qnn in two_layer_qnn

* updated

* 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

* reflected comments

* fix spell

* fix

* add torch tests

* update docstring

* added a code snippet

* fix spell

* fix spell

* fix pylint, fix condition

Co-authored-by: Anton Dekusar <adekusar@ie.ibm.com>
Co-authored-by: Anton Dekusar <62334182+adekusar-drl@users.noreply.github.com>
Co-authored-by: Manoel Marques <Manoel.Marques@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a QNN based on the Estimator primitive

6 participants