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

Revamp readme pt2 #822

Merged
merged 10 commits into from
Aug 20, 2024
Merged

Conversation

edoaltamura
Copy link
Collaborator

@edoaltamura edoaltamura commented Aug 6, 2024

Summary

This PR introduces the second round of updates and changes for the repo README ahead of the release of version 0.8. Changes focus on the following sections.

  • Overview
  • Description of features
  • Optional installs and migration guide reflecting the requirement of Qiskit 1.0 or above.

These chances are proposed with the incorporation of Qiskit Algorithms in mind. Therefore, it would be best to merge this code once #817 has been merged.

Details and comments

@coveralls
Copy link

coveralls commented Aug 6, 2024

Pull Request Test Coverage Report for Build 10453641427

Details

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

Files with Coverage Reduction New Missed Lines %
qiskit_machine_learning/circuit/library/raw_feature_vector.py 2 85.94%
Totals Coverage Status
Change from base Build 10364649564: -0.04%
Covered Lines: 4638
Relevant Lines: 5060

💛 - Coveralls

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
edoaltamura and others added 2 commits August 6, 2024 21:58
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
@woodsp-ibm
Copy link
Member

woodsp-ibm commented Aug 7, 2024

With the change to the Optional Install I think the source for the Getting Started page, around optional installs should be updated too https://qiskit-community.github.io/qiskit-machine-learning/getting_started.html#optional-installs

@edoaltamura
Copy link
Collaborator Author

I'll update the documentation page too. In the meantime, has this Nlopt installation error appeared before in algorithms? ERROR: Failed building wheel for nlopt
Could it be related to the compiler set-up in the CI environment?

@woodsp-ibm
Copy link
Member

In the meantime, has this Nlopt installation error

From what I see the NLOpt optimizers were never tested in CI that algorithms has. NLOpt has installation info that talks about compilation but does not include Mac though searching finds some discussions elsewhere. Depending on how much effort its felt to try to get this working the alternative is just to skip installing/tests for those envs where installation is problematic - the unit tests already have the optional check so it would just come down to installing or not.

@edoaltamura
Copy link
Collaborator Author

I agree on parking support for NLopt in the CI for now. I reverted the changes that aimed to do this and included instructions to manually install it (optionally if required by the user). I took this opportunity to update the RST files too to reflect the changes in the Readme.

@edoaltamura edoaltamura requested a review from woodsp-ibm August 9, 2024 11:36
.pylintdict Outdated Show resolved Hide resolved
@edoaltamura edoaltamura requested a review from woodsp-ibm August 15, 2024 15:04
@edoaltamura
Copy link
Collaborator Author

Note that I updated the BaseStateFidelity link in README.md, which will reflect the updated documentation as soon as it comes online after the 0.8 version rollout. This update is documented in #823, therefore this PR also closes this issue in advance.

@OkuyanBoga OkuyanBoga merged commit 30dad80 into qiskit-community:main Aug 20, 2024
19 checks passed
@edoaltamura edoaltamura deleted the revamp-readme-pt2 branch October 18, 2024 11:43
OkuyanBoga added a commit to OkuyanBoga/hc-qiskit-machine-learning that referenced this pull request Nov 7, 2024
* Migrating `qiskit_algorithms` (qiskit-community#817)

* Update README.md

* Generalize the Einstein summation signature

* Add reno

* Update Copyright

* Rename and add test

* Update Copyright

* Add docstring for `test_get_einsum_signature`

* Correct spelling

* Disable spellcheck for comments

* Add `docstring` in pylint dict

* Delete example in docstring

* Add Einstein in pylint dict

* Add full use case in einsum dict

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (2/2)

* Update RuntimeError msg

* Update RuntimeError msg - line too long

* Trigger CI

* Merge algos, globals.random to fix

* Fixed `algorithms_globals`

* Import /tests and run CI locally

* Fix copyrights and some spellings

* Ignore mypy in 8 instances

* Merge spell dicts

* Black reformatting

* Black reformatting

* Add reno

* Lint sanitize

* Pylint

* Pylint

* Pylint

* Pylint

* Fix relative imports in tutorials

* Fix relative imports in tutorials

* Remove algorithms from Jupyter magic methods

* Temporarily disable "Run stable tutorials" tests

* Change the docstrings with imports from qiskit_algorithms

* Styling

* Update qiskit_machine_learning/optimizers/gradient_descent.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Update qiskit_machine_learning/optimizers/optimizer_utils/learning_rate.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Add more tests for utils

* Add more tests for optimizers: adam, bobyqa, gsls and imfil

* Fix random seed for volatile optimizers

* Fix random seed for volatile optimizers

* Add more tests

* Pylint dict

* Activate scikit-quant-0.8.2

* Remove scikit-quant methods

* Remove scikit-quant methods (2)

* Edit the release notes and Qiskit version 1+

* Edit the release notes and Qiskit version 1+

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Apply line breaks

* Restructure line breaks

---------

Co-authored-by: FrancescaSchiav <FrancescaSchiav@users.noreply.github.com>
Co-authored-by: M. Emre Sahin <40424147+OkuyanBoga@users.noreply.github.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Revamp readme pt2 (qiskit-community#822)

* Restructure README.md
---------

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

* V2 Primitive Support for SamplerQNN and Gradients

* Update base_sampler_gradient.py

* Update qiskit_machine_learning/gradients/param_shift/param_shift_sampler_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/gradients/spsa/spsa_sampler_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/gradients/spsa/spsa_sampler_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/sampler_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/sampler_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/sampler_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/sampler_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/sampler_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/sampler_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Fix lint errors due to Pylint 3.3.0 update in CI (qiskit-community#833)

* disable=too-many-positional-arguments

* Transfer pylint rc to toml

* Transfer pylint rc to toml

* Minor fixes

* Remove Python 3.8 from CI (qiskit-community#824) (qiskit-community#826)

* Remove Python 3.8 in CI (qiskit-community#824)

* Correct `tmp` dirs (qiskit-community#818)

* Correct unit py version (qiskit-community#818)

* Add reno (qiskit-community#818)

* Finalze removal of py38 (qiskit-community#818)

* Spelling

* Remove duplicate tmp folder

* Updated the release note

* Bump min pyversion in toml

* Remove ipython constraints

* Update reno

* Updated test for test_sampler_qnn

* Fix: output_shape

* Adding optimisation level to TestSamplerQNN SamplerV2 option

* Correcting the PUB prep for SamplerV2 by changing max iterator from n to len(job_param_values). Added a load of print statements to investigate behaviour when self._output_shape = (2, 3) - a tuple as this was failing tests due to a comparison in line 166. This has lead me to think that the way we are calculating QuasiDistribution is wrong as we need to know which real qubits the virtual qubits have been transpiled too to calculate the correct dist for SamplerV2. Following this up with IBM runtime.

* Update sampler_qnn.py for correcting tuple output_shape when interpret is provided.

* Adding ISA capabilities to gradients

* Fix output shape and its default for V2

* Implement SamplerV2 for bayesian inference

* Implement SamplerV2 for bayesian inference

* Adding ISA capabilities to SamplerQNN and ParamShiftSamplerGradient

* Removing unused backend

* Removing failed merge conflicts

* Removing residual merge conflicts

* added SamplerV2 support for ComputeUncompute

* Removing multiple tranpilations within same test

* Formatting

* Linting

* Adding measure_all to setUp

* removing default pm

---------

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>
Co-authored-by: FrancescaSchiav <FrancescaSchiav@users.noreply.github.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
Co-authored-by: oscar-wallis <oscar.wallis@outlook.com>
oscar-wallis added a commit to OkuyanBoga/hc-qiskit-machine-learning that referenced this pull request Nov 7, 2024
* Migrating `qiskit_algorithms` (qiskit-community#817)

* Update README.md

* Generalize the Einstein summation signature

* Add reno

* Update Copyright

* Rename and add test

* Update Copyright

* Add docstring for `test_get_einsum_signature`

* Correct spelling

* Disable spellcheck for comments

* Add `docstring` in pylint dict

* Delete example in docstring

* Add Einstein in pylint dict

* Add full use case in einsum dict

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (2/2)

* Update RuntimeError msg

* Update RuntimeError msg - line too long

* Trigger CI

* Merge algos, globals.random to fix

* Fixed `algorithms_globals`

* Import /tests and run CI locally

* Fix copyrights and some spellings

* Ignore mypy in 8 instances

* Merge spell dicts

* Black reformatting

* Black reformatting

* Add reno

* Lint sanitize

* Pylint

* Pylint

* Pylint

* Pylint

* Fix relative imports in tutorials

* Fix relative imports in tutorials

* Remove algorithms from Jupyter magic methods

* Temporarily disable "Run stable tutorials" tests

* Change the docstrings with imports from qiskit_algorithms

* Styling

* Update qiskit_machine_learning/optimizers/gradient_descent.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Update qiskit_machine_learning/optimizers/optimizer_utils/learning_rate.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Add more tests for utils

* Add more tests for optimizers: adam, bobyqa, gsls and imfil

* Fix random seed for volatile optimizers

* Fix random seed for volatile optimizers

* Add more tests

* Pylint dict

* Activate scikit-quant-0.8.2

* Remove scikit-quant methods

* Remove scikit-quant methods (2)

* Edit the release notes and Qiskit version 1+

* Edit the release notes and Qiskit version 1+

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Apply line breaks

* Restructure line breaks

---------

Co-authored-by: FrancescaSchiav <FrancescaSchiav@users.noreply.github.com>
Co-authored-by: M. Emre Sahin <40424147+OkuyanBoga@users.noreply.github.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Revamp readme pt2 (qiskit-community#822)

* Restructure README.md
---------

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

* Added support for EstimatorV2 primitives

* Update qiskit_machine_learning/neural_networks/estimator_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/estimator_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/estimator_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/estimator_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/gradients/param_shift/param_shift_estimator_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/gradients/spsa/spsa_estimator_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/gradients/param_shift/param_shift_estimator_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/estimator_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/estimator_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/gradients/param_shift/param_shift_estimator_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Fix lint errors due to Pylint 3.3.0 update in CI (qiskit-community#833)

* disable=too-many-positional-arguments

* Transfer pylint rc to toml

* Transfer pylint rc to toml

* Cleaner statements

* Remove Python 3.8 from CI (qiskit-community#824) (qiskit-community#826)

* Remove Python 3.8 in CI (qiskit-community#824)

* Correct `tmp` dirs (qiskit-community#818)

* Correct unit py version (qiskit-community#818)

* Add reno (qiskit-community#818)

* Finalze removal of py38 (qiskit-community#818)

* Spelling

* Remove duplicate tmp folder

* Updated the release note

* Bump min pyversion in toml

* Remove ipython constraints

* Update reno

* Added unit tests for estimatorqnnV2 and minor fixes

* Make black

* Make lint and changes to V1/2 choice logics

* Update requirements

* Add default precision

* Update estimator tests

* Change num qubits in backend

* Allow for num_qubits=None

* Fix shape in parameter shift

* Fix shape in parameter shift

* Fix shape observables

* Fix shape observables

* Change default precision to match base estimator

* Fix remaining shape issues

* Estimator seed has no effect in local testing

* fix argnames and supress error tolerance for test_estimator_qnn_v2

* Added pass manager the gradients.

* quick bugfix for isa_circuits

* Updating PUBs for estimatorqnn, updating test_estimator_qnn_v2 for ISA circs and relaxing tolerances

* Lint and formatting

* Tranpiling observables for isa g circs

* fixing apply_layout

---------

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>
Co-authored-by: FrancescaSchiav <FrancescaSchiav@users.noreply.github.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
Co-authored-by: oscar-wallis <oscar.wallis@outlook.com>
oscar-wallis added a commit to OkuyanBoga/hc-qiskit-machine-learning that referenced this pull request Nov 8, 2024
* Migrating `qiskit_algorithms` (qiskit-community#817)

* Update README.md

* Generalize the Einstein summation signature

* Add reno

* Update Copyright

* Rename and add test

* Update Copyright

* Add docstring for `test_get_einsum_signature`

* Correct spelling

* Disable spellcheck for comments

* Add `docstring` in pylint dict

* Delete example in docstring

* Add Einstein in pylint dict

* Add full use case in einsum dict

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (2/2)

* Update RuntimeError msg

* Update RuntimeError msg - line too long

* Trigger CI

* Merge algos, globals.random to fix

* Fixed `algorithms_globals`

* Import /tests and run CI locally

* Fix copyrights and some spellings

* Ignore mypy in 8 instances

* Merge spell dicts

* Black reformatting

* Black reformatting

* Add reno

* Lint sanitize

* Pylint

* Pylint

* Pylint

* Pylint

* Fix relative imports in tutorials

* Fix relative imports in tutorials

* Remove algorithms from Jupyter magic methods

* Temporarily disable "Run stable tutorials" tests

* Change the docstrings with imports from qiskit_algorithms

* Styling

* Update qiskit_machine_learning/optimizers/gradient_descent.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Update qiskit_machine_learning/optimizers/optimizer_utils/learning_rate.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Add more tests for utils

* Add more tests for optimizers: adam, bobyqa, gsls and imfil

* Fix random seed for volatile optimizers

* Fix random seed for volatile optimizers

* Add more tests

* Pylint dict

* Activate scikit-quant-0.8.2

* Remove scikit-quant methods

* Remove scikit-quant methods (2)

* Edit the release notes and Qiskit version 1+

* Edit the release notes and Qiskit version 1+

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Apply line breaks

* Restructure line breaks

---------

Co-authored-by: FrancescaSchiav <FrancescaSchiav@users.noreply.github.com>
Co-authored-by: M. Emre Sahin <40424147+OkuyanBoga@users.noreply.github.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Revamp readme pt2 (qiskit-community#822)

* Restructure README.md
---------

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

* Fix lint errors due to Pylint 3.3.0 update in CI (qiskit-community#833)

* disable=too-many-positional-arguments

* Transfer pylint rc to toml

* Transfer pylint rc to toml

* Remove Python 3.8 from CI (qiskit-community#824) (qiskit-community#826)

* Remove Python 3.8 in CI (qiskit-community#824)

* Correct `tmp` dirs (qiskit-community#818)

* Correct unit py version (qiskit-community#818)

* Add reno (qiskit-community#818)

* Finalze removal of py38 (qiskit-community#818)

* Spelling

* Remove duplicate tmp folder

* Updated the release note

* Bump min pyversion in toml

* Remove ipython constraints

* Update reno

* Reestablish latest Pytorch and Numpy (qiskit-community#818) (qiskit-community#827)

* Reestablish latest Pytorch and Numpy (qiskit-community#818)

* Keep pinned Numpy

* Keep pinned Numpy

* Fix numpy min version

* Fix RawFeatureVector for failing test case (qiskit-community#838)

* Alter RawFeatureVector normalization

* Alter RawFeatureVector normalization

* Release nbconvert constraints (qiskit-community#842)

* Remove redundant MacOS 14 image in CI (qiskit-community#841)

* Remove redundant MacOS 14 image

* Update with macos-latest-large

* Revert "Update with macos-latest-large"

This reverts commit 14f945e.

* Update with macos-latest-large

* Update v2 (#54)

* bugfix for V1

* formatting

---------

Co-authored-by: oscar-wallis <oscar.wallis@outlook.com>

---------

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>
Co-authored-by: FrancescaSchiav <FrancescaSchiav@users.noreply.github.com>
Co-authored-by: M. Emre Sahin <40424147+OkuyanBoga@users.noreply.github.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
OkuyanBoga added a commit that referenced this pull request Nov 11, 2024
* Update README.md

* Generalize the Einstein summation signature

* Add reno

* Update Copyright

* Rename and add test

* Update Copyright

* Add docstring for `test_get_einsum_signature`

* Correct spelling

* Disable spellcheck for comments

* Add `docstring` in pylint dict

* Delete example in docstring

* Add Einstein in pylint dict

* Add full use case in einsum dict

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (2/2)

* Update RuntimeError msg

* Update RuntimeError msg - line too long

* Trigger CI

* Merge algos, globals.random to fix

* Fixed `algorithms_globals`

* Import /tests and run CI locally

* Fix copyrights and some spellings

* Ignore mypy in 8 instances

* Merge spell dicts

* Black reformatting

* Black reformatting

* Add reno

* Lint sanitize

* Pylint

* Pylint

* Pylint

* Pylint

* Fix relative imports in tutorials

* Fix relative imports in tutorials

* Remove algorithms from Jupyter magic methods

* Temporarily disable "Run stable tutorials" tests

* Change the docstrings with imports from qiskit_algorithms

* Styling

* Update qiskit_machine_learning/optimizers/gradient_descent.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Update qiskit_machine_learning/optimizers/optimizer_utils/learning_rate.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Add more tests for utils

* Add more tests for optimizers: adam, bobyqa, gsls and imfil

* Fix random seed for volatile optimizers

* Fix random seed for volatile optimizers

* Add more tests

* Pylint dict

* Activate scikit-quant-0.8.2

* Remove scikit-quant methods

* Remove scikit-quant methods (2)

* Edit the release notes and Qiskit version 1+

* Edit the release notes and Qiskit version 1+

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Apply line breaks

* Restructure line breaks

* Added support for SamplerV2 primitives (#49)

* Migrating `qiskit_algorithms` (#817)

* Update README.md

* Generalize the Einstein summation signature

* Add reno

* Update Copyright

* Rename and add test

* Update Copyright

* Add docstring for `test_get_einsum_signature`

* Correct spelling

* Disable spellcheck for comments

* Add `docstring` in pylint dict

* Delete example in docstring

* Add Einstein in pylint dict

* Add full use case in einsum dict

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (2/2)

* Update RuntimeError msg

* Update RuntimeError msg - line too long

* Trigger CI

* Merge algos, globals.random to fix

* Fixed `algorithms_globals`

* Import /tests and run CI locally

* Fix copyrights and some spellings

* Ignore mypy in 8 instances

* Merge spell dicts

* Black reformatting

* Black reformatting

* Add reno

* Lint sanitize

* Pylint

* Pylint

* Pylint

* Pylint

* Fix relative imports in tutorials

* Fix relative imports in tutorials

* Remove algorithms from Jupyter magic methods

* Temporarily disable "Run stable tutorials" tests

* Change the docstrings with imports from qiskit_algorithms

* Styling

* Update qiskit_machine_learning/optimizers/gradient_descent.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Update qiskit_machine_learning/optimizers/optimizer_utils/learning_rate.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Add more tests for utils

* Add more tests for optimizers: adam, bobyqa, gsls and imfil

* Fix random seed for volatile optimizers

* Fix random seed for volatile optimizers

* Add more tests

* Pylint dict

* Activate scikit-quant-0.8.2

* Remove scikit-quant methods

* Remove scikit-quant methods (2)

* Edit the release notes and Qiskit version 1+

* Edit the release notes and Qiskit version 1+

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Apply line breaks

* Restructure line breaks

---------

Co-authored-by: FrancescaSchiav <FrancescaSchiav@users.noreply.github.com>
Co-authored-by: M. Emre Sahin <40424147+OkuyanBoga@users.noreply.github.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Revamp readme pt2 (#822)

* Restructure README.md
---------

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

* V2 Primitive Support for SamplerQNN and Gradients

* Update base_sampler_gradient.py

* Update qiskit_machine_learning/gradients/param_shift/param_shift_sampler_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/gradients/spsa/spsa_sampler_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/gradients/spsa/spsa_sampler_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/sampler_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/sampler_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/sampler_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/sampler_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/sampler_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/sampler_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Fix lint errors due to Pylint 3.3.0 update in CI (#833)

* disable=too-many-positional-arguments

* Transfer pylint rc to toml

* Transfer pylint rc to toml

* Minor fixes

* Remove Python 3.8 from CI (#824) (#826)

* Remove Python 3.8 in CI (#824)

* Correct `tmp` dirs (#818)

* Correct unit py version (#818)

* Add reno (#818)

* Finalze removal of py38 (#818)

* Spelling

* Remove duplicate tmp folder

* Updated the release note

* Bump min pyversion in toml

* Remove ipython constraints

* Update reno

* Updated test for test_sampler_qnn

* Fix: output_shape

* Adding optimisation level to TestSamplerQNN SamplerV2 option

* Correcting the PUB prep for SamplerV2 by changing max iterator from n to len(job_param_values). Added a load of print statements to investigate behaviour when self._output_shape = (2, 3) - a tuple as this was failing tests due to a comparison in line 166. This has lead me to think that the way we are calculating QuasiDistribution is wrong as we need to know which real qubits the virtual qubits have been transpiled too to calculate the correct dist for SamplerV2. Following this up with IBM runtime.

* Update sampler_qnn.py for correcting tuple output_shape when interpret is provided.

* Adding ISA capabilities to gradients

* Fix output shape and its default for V2

* Implement SamplerV2 for bayesian inference

* Implement SamplerV2 for bayesian inference

* Adding ISA capabilities to SamplerQNN and ParamShiftSamplerGradient

* Removing unused backend

* Removing failed merge conflicts

* Removing residual merge conflicts

* added SamplerV2 support for ComputeUncompute

* Removing multiple tranpilations within same test

* Formatting

* Linting

* Adding measure_all to setUp

* removing default pm

---------

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>
Co-authored-by: FrancescaSchiav <FrancescaSchiav@users.noreply.github.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
Co-authored-by: oscar-wallis <oscar.wallis@outlook.com>

* Added support for EstimatorV2 primitives (#48)

* Migrating `qiskit_algorithms` (#817)

* Update README.md

* Generalize the Einstein summation signature

* Add reno

* Update Copyright

* Rename and add test

* Update Copyright

* Add docstring for `test_get_einsum_signature`

* Correct spelling

* Disable spellcheck for comments

* Add `docstring` in pylint dict

* Delete example in docstring

* Add Einstein in pylint dict

* Add full use case in einsum dict

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (2/2)

* Update RuntimeError msg

* Update RuntimeError msg - line too long

* Trigger CI

* Merge algos, globals.random to fix

* Fixed `algorithms_globals`

* Import /tests and run CI locally

* Fix copyrights and some spellings

* Ignore mypy in 8 instances

* Merge spell dicts

* Black reformatting

* Black reformatting

* Add reno

* Lint sanitize

* Pylint

* Pylint

* Pylint

* Pylint

* Fix relative imports in tutorials

* Fix relative imports in tutorials

* Remove algorithms from Jupyter magic methods

* Temporarily disable "Run stable tutorials" tests

* Change the docstrings with imports from qiskit_algorithms

* Styling

* Update qiskit_machine_learning/optimizers/gradient_descent.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Update qiskit_machine_learning/optimizers/optimizer_utils/learning_rate.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Add more tests for utils

* Add more tests for optimizers: adam, bobyqa, gsls and imfil

* Fix random seed for volatile optimizers

* Fix random seed for volatile optimizers

* Add more tests

* Pylint dict

* Activate scikit-quant-0.8.2

* Remove scikit-quant methods

* Remove scikit-quant methods (2)

* Edit the release notes and Qiskit version 1+

* Edit the release notes and Qiskit version 1+

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Apply line breaks

* Restructure line breaks

---------

Co-authored-by: FrancescaSchiav <FrancescaSchiav@users.noreply.github.com>
Co-authored-by: M. Emre Sahin <40424147+OkuyanBoga@users.noreply.github.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Revamp readme pt2 (#822)

* Restructure README.md
---------

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

* Added support for EstimatorV2 primitives

* Update qiskit_machine_learning/neural_networks/estimator_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/estimator_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/estimator_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/estimator_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/gradients/param_shift/param_shift_estimator_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/gradients/spsa/spsa_estimator_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/gradients/param_shift/param_shift_estimator_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/estimator_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/neural_networks/estimator_qnn.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Update qiskit_machine_learning/gradients/param_shift/param_shift_estimator_gradient.py

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>

* Fix lint errors due to Pylint 3.3.0 update in CI (#833)

* disable=too-many-positional-arguments

* Transfer pylint rc to toml

* Transfer pylint rc to toml

* Cleaner statements

* Remove Python 3.8 from CI (#824) (#826)

* Remove Python 3.8 in CI (#824)

* Correct `tmp` dirs (#818)

* Correct unit py version (#818)

* Add reno (#818)

* Finalze removal of py38 (#818)

* Spelling

* Remove duplicate tmp folder

* Updated the release note

* Bump min pyversion in toml

* Remove ipython constraints

* Update reno

* Added unit tests for estimatorqnnV2 and minor fixes

* Make black

* Make lint and changes to V1/2 choice logics

* Update requirements

* Add default precision

* Update estimator tests

* Change num qubits in backend

* Allow for num_qubits=None

* Fix shape in parameter shift

* Fix shape in parameter shift

* Fix shape observables

* Fix shape observables

* Change default precision to match base estimator

* Fix remaining shape issues

* Estimator seed has no effect in local testing

* fix argnames and supress error tolerance for test_estimator_qnn_v2

* Added pass manager the gradients.

* quick bugfix for isa_circuits

* Updating PUBs for estimatorqnn, updating test_estimator_qnn_v2 for ISA circs and relaxing tolerances

* Lint and formatting

* Tranpiling observables for isa g circs

* fixing apply_layout

---------

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>
Co-authored-by: FrancescaSchiav <FrancescaSchiav@users.noreply.github.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
Co-authored-by: oscar-wallis <oscar.wallis@outlook.com>

* Pulled changes from main

* Quick fix

* bugfix for V1

* formatting

* Prep-ing for 0.8 (#53)

* Migrating `qiskit_algorithms` (#817)

* Update README.md

* Generalize the Einstein summation signature

* Add reno

* Update Copyright

* Rename and add test

* Update Copyright

* Add docstring for `test_get_einsum_signature`

* Correct spelling

* Disable spellcheck for comments

* Add `docstring` in pylint dict

* Delete example in docstring

* Add Einstein in pylint dict

* Add full use case in einsum dict

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Spelling and type ignore

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (1/2)

* Remove for loop in einsum function and remove Literal arguments (2/2)

* Update RuntimeError msg

* Update RuntimeError msg - line too long

* Trigger CI

* Merge algos, globals.random to fix

* Fixed `algorithms_globals`

* Import /tests and run CI locally

* Fix copyrights and some spellings

* Ignore mypy in 8 instances

* Merge spell dicts

* Black reformatting

* Black reformatting

* Add reno

* Lint sanitize

* Pylint

* Pylint

* Pylint

* Pylint

* Fix relative imports in tutorials

* Fix relative imports in tutorials

* Remove algorithms from Jupyter magic methods

* Temporarily disable "Run stable tutorials" tests

* Change the docstrings with imports from qiskit_algorithms

* Styling

* Update qiskit_machine_learning/optimizers/gradient_descent.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Update qiskit_machine_learning/optimizers/optimizer_utils/learning_rate.py

Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Add more tests for utils

* Add more tests for optimizers: adam, bobyqa, gsls and imfil

* Fix random seed for volatile optimizers

* Fix random seed for volatile optimizers

* Add more tests

* Pylint dict

* Activate scikit-quant-0.8.2

* Remove scikit-quant methods

* Remove scikit-quant methods (2)

* Edit the release notes and Qiskit version 1+

* Edit the release notes and Qiskit version 1+

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Add Qiskit 1.0 upgrade in reno

* Apply line breaks

* Restructure line breaks

---------

Co-authored-by: FrancescaSchiav <FrancescaSchiav@users.noreply.github.com>
Co-authored-by: M. Emre Sahin <40424147+OkuyanBoga@users.noreply.github.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>

* Revamp readme pt2 (#822)

* Restructure README.md
---------

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

* Fix lint errors due to Pylint 3.3.0 update in CI (#833)

* disable=too-many-positional-arguments

* Transfer pylint rc to toml

* Transfer pylint rc to toml

* Remove Python 3.8 from CI (#824) (#826)

* Remove Python 3.8 in CI (#824)

* Correct `tmp` dirs (#818)

* Correct unit py version (#818)

* Add reno (#818)

* Finalze removal of py38 (#818)

* Spelling

* Remove duplicate tmp folder

* Updated the release note

* Bump min pyversion in toml

* Remove ipython constraints

* Update reno

* Reestablish latest Pytorch and Numpy (#818) (#827)

* Reestablish latest Pytorch and Numpy (#818)

* Keep pinned Numpy

* Keep pinned Numpy

* Fix numpy min version

* Fix RawFeatureVector for failing test case (#838)

* Alter RawFeatureVector normalization

* Alter RawFeatureVector normalization

* Release nbconvert constraints (#842)

* Remove redundant MacOS 14 image in CI (#841)

* Remove redundant MacOS 14 image

* Update with macos-latest-large

* Revert "Update with macos-latest-large"

This reverts commit 14f945e.

* Update with macos-latest-large

* Update v2 (#54)

* bugfix for V1

* formatting

---------

Co-authored-by: oscar-wallis <oscar.wallis@outlook.com>

---------

Co-authored-by: Edoardo Altamura <38359901+edoaltamura@users.noreply.github.com>
Co-authored-by: FrancescaSchiav <FrancescaSchiav@users.noreply.github.com>
Co-authored-by: M. Emre Sahin <40424147+OkuyanBoga@users.noreply.github.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>

* Update test_qbayesian

* Bugfixing the test_gradient

* Fixing an Options error with sampler_gradient

* Linting and formatting

* Add reno

* Fix dict typing definition

* Fix mypy

* Issue deprecation warnings

* Update skip test message

* Update deprecation warning for qbayesian.py

* Update deprecation warning for qbayesian.py

* Add headers in deprecation.py

* Add headers in deprecation.py

* Add headers in deprecation.py

* Correct spelling

* Add spelling `msg`

---------

Co-authored-by: FrancescaSchiav <FrancescaSchiav@users.noreply.github.com>
Co-authored-by: M. Emre Sahin <40424147+OkuyanBoga@users.noreply.github.com>
Co-authored-by: Declan Millar <declan.millar@ibm.com>
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
Co-authored-by: oscar-wallis <oscar.wallis@outlook.com>
Co-authored-by: Emre <mustafaemresahin@outlook.com>
Co-authored-by: Oscar <108736468+oscar-wallis@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
4 participants