Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Refactoring Grover class in QuantumAlgorithm #1268

Merged
merged 57 commits into from
Oct 1, 2020

Conversation

a-matsuo
Copy link
Contributor

Summary

Changed Grover class in QuantumAlgorithm to use GroverOperator (Qiskit/qiskit#4828) inside.

Details and comments

The change is to use GroverOperator inside of Grover class in QuantumAlgorithm. The change allows to use GroverOperator as the input of Grover, and existing inputs as well.

@Cryoris Cryoris marked this pull request as draft September 24, 2020 06:26
@Cryoris Cryoris marked this pull request as ready for review September 29, 2020 11:00
@Cryoris Cryoris changed the title [WIP] Refactoring Grover class in QuantumAlgorithm Refactoring Grover class in QuantumAlgorithm Sep 29, 2020
@manoelmarques manoelmarques merged commit da6253b into qiskit-community:master Oct 1, 2020
mtreinish pushed a commit to mtreinish/qiskit-core that referenced this pull request Nov 20, 2020
…skit-aqua#1268)

* added code skelton

* added more information

* modified initialization

* refactored constructor_circuit function

* ver 0.8

* fix lint & style

* work on the initializer

* fix spell

* massively simplify run logic

* updated

* fixed state_vector case

* fixed for QuantumCircuit oracle type

* adding constructor tests

* added constructor tests

* added functional tests

* renamed test_grover_new.py

* fixed typo

* added more tests and changed its name to grover

* removed grover_new files

* fix lint

* fix lint and rm duplicate code

* update grover_optimizer to work on circuits

* make power optional in construct_circuit for bwkdc

* added post_processing

* adding the
iterations argument

* added the iterations argument

* fixed iterations

* fix mypy

* fix lint

* rm utf-8 header and trailing print comments

* allow old signature and test it

* fix lint & rm old test file

* undo reordering of imports to try fixing test

* fix mypy

* fix spell and copyright

* rm unnecessary error if good state is not supported

* refactor init of Grover

* fix bkwd compatible behaviour

* fix spell

* removed special if for TruthTableOracle

* rm unused import

Co-authored-by: Cryoris <jules.gacon@googlemail.com>
Co-authored-by: Manoel Marques <Manoel.Marques@ibm.com>
manoelmarques added a commit to manoelmarques/qiskit-terra that referenced this pull request Nov 23, 2020
…skit-aqua#1268)

* added code skelton

* added more information

* modified initialization

* refactored constructor_circuit function

* ver 0.8

* fix lint & style

* work on the initializer

* fix spell

* massively simplify run logic

* updated

* fixed state_vector case

* fixed for QuantumCircuit oracle type

* adding constructor tests

* added constructor tests

* added functional tests

* renamed test_grover_new.py

* fixed typo

* added more tests and changed its name to grover

* removed grover_new files

* fix lint

* fix lint and rm duplicate code

* update grover_optimizer to work on circuits

* make power optional in construct_circuit for bwkdc

* added post_processing

* adding the
iterations argument

* added the iterations argument

* fixed iterations

* fix mypy

* fix lint

* rm utf-8 header and trailing print comments

* allow old signature and test it

* fix lint & rm old test file

* undo reordering of imports to try fixing test

* fix mypy

* fix spell and copyright

* rm unnecessary error if good state is not supported

* refactor init of Grover

* fix bkwd compatible behaviour

* fix spell

* removed special if for TruthTableOracle

* rm unused import

Co-authored-by: Cryoris <jules.gacon@googlemail.com>
Co-authored-by: Manoel Marques <Manoel.Marques@ibm.com>
manoelmarques added a commit to manoelmarques/qiskit-terra that referenced this pull request Dec 7, 2020
…skit-aqua#1268)

* added code skelton

* added more information

* modified initialization

* refactored constructor_circuit function

* ver 0.8

* fix lint & style

* work on the initializer

* fix spell

* massively simplify run logic

* updated

* fixed state_vector case

* fixed for QuantumCircuit oracle type

* adding constructor tests

* added constructor tests

* added functional tests

* renamed test_grover_new.py

* fixed typo

* added more tests and changed its name to grover

* removed grover_new files

* fix lint

* fix lint and rm duplicate code

* update grover_optimizer to work on circuits

* make power optional in construct_circuit for bwkdc

* added post_processing

* adding the
iterations argument

* added the iterations argument

* fixed iterations

* fix mypy

* fix lint

* rm utf-8 header and trailing print comments

* allow old signature and test it

* fix lint & rm old test file

* undo reordering of imports to try fixing test

* fix mypy

* fix spell and copyright

* rm unnecessary error if good state is not supported

* refactor init of Grover

* fix bkwd compatible behaviour

* fix spell

* removed special if for TruthTableOracle

* rm unused import

Co-authored-by: Cryoris <jules.gacon@googlemail.com>
Co-authored-by: Manoel Marques <Manoel.Marques@ibm.com>
manoelmarques added a commit to qiskit-community/qiskit-optimization that referenced this pull request Jan 14, 2021
…skit-aqua#1268)

* added code skelton

* added more information

* modified initialization

* refactored constructor_circuit function

* ver 0.8

* fix lint & style

* work on the initializer

* fix spell

* massively simplify run logic

* updated

* fixed state_vector case

* fixed for QuantumCircuit oracle type

* adding constructor tests

* added constructor tests

* added functional tests

* renamed test_grover_new.py

* fixed typo

* added more tests and changed its name to grover

* removed grover_new files

* fix lint

* fix lint and rm duplicate code

* update grover_optimizer to work on circuits

* make power optional in construct_circuit for bwkdc

* added post_processing

* adding the
iterations argument

* added the iterations argument

* fixed iterations

* fix mypy

* fix lint

* rm utf-8 header and trailing print comments

* allow old signature and test it

* fix lint & rm old test file

* undo reordering of imports to try fixing test

* fix mypy

* fix spell and copyright

* rm unnecessary error if good state is not supported

* refactor init of Grover

* fix bkwd compatible behaviour

* fix spell

* removed special if for TruthTableOracle

* rm unused import

Co-authored-by: Cryoris <jules.gacon@googlemail.com>
Co-authored-by: Manoel Marques <Manoel.Marques@ibm.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog: API Change Include in the Changed section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants