This repository has been archived by the owner on Dec 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 376
Refactoring Grover
class in QuantumAlgorithm
#1268
Merged
manoelmarques
merged 57 commits into
qiskit-community:master
from
a-matsuo:grover_refactor
Oct 1, 2020
Merged
Refactoring Grover
class in QuantumAlgorithm
#1268
manoelmarques
merged 57 commits into
qiskit-community:master
from
a-matsuo:grover_refactor
Oct 1, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lint & style
Simplify the run logic
…o grover_refactor
a-matsuo
requested review from
levbishop,
manoelmarques and
woodsp-ibm
as code owners
September 24, 2020 03:51
…o grover_refactor
…o grover_refactor
Cryoris
changed the title
[WIP] Refactoring
Refactoring Sep 29, 2020
Grover
class in QuantumAlgorithm
Grover
class in QuantumAlgorithm
manoelmarques
approved these changes
Sep 30, 2020
woodsp-ibm
approved these changes
Sep 30, 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Changed
Grover
class inQuantumAlgorithm
to useGroverOperator
(Qiskit/qiskit#4828) inside.Details and comments
The change is to use
GroverOperator
inside ofGrover
class inQuantumAlgorithm
. The change allows to useGroverOperator
as the input ofGrover
, and existing inputs as well.