Skip to content

Commit

Permalink
Separate State Preparation from Initialize (#7666)
Browse files Browse the repository at this point in the history
* Split initialize and stateprep first attempt

* Tidied up code and added some tests

* ✨ lint ✨

* Tidied up code

* Removed unnecessary file

* Formatted docstrings

* Formatted docstrings again

* ✨ lint again ✨

* Fixed some docs bugs and added tests

* Update docs and lint

* docs fix

* Change StatePrep to a Gate and update tests

* Fixed tests and docs

* ✨ lint ✨

* Fixed test

* Add parmas getter and setter

* Fix stateprep inverse

* Fix merge issues

* Fix stateprep inverse

* Fix broadcast_arg error

* ✨ Lint! ✨

* Updated based on PR comments

* ✨ Lint ✨

* Update qiskit/extensions/quantum_initializer/state_preparation.py

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Moved stateprep to circuit library

* Adjust label logic

* Update qiskit/circuit/library/data_preparation/state_preparation.py

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Update qiskit/circuit/library/data_preparation/state_preparation.py

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Update qiskit/circuit/library/data_preparation/state_preparation.py

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Fixed docstrings and tests

* Update qiskit/circuit/library/data_preparation/state_preparation.py

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Added repeat test

* Added test and reno

* Fix label issue

* Fixed docstrings

* ✨ Lint! ✨

Co-authored-by: Julien Gacon <gaconju@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 25, 2022
1 parent a540794 commit c318725
Show file tree
Hide file tree
Showing 8 changed files with 736 additions and 337 deletions.
3 changes: 2 additions & 1 deletion qiskit/circuit/library/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@
PauliFeatureMap
ZFeatureMap
ZZFeatureMap
StatePreparation
NCT (Not-CNOT-Toffoli) template circuits
========================================
Expand Down Expand Up @@ -416,7 +417,7 @@
ExcitationPreserving,
QAOAAnsatz,
)
from .data_preparation import PauliFeatureMap, ZFeatureMap, ZZFeatureMap
from .data_preparation import PauliFeatureMap, ZFeatureMap, ZZFeatureMap, StatePreparation
from .quantum_volume import QuantumVolume
from .fourier_checking import FourierChecking
from .graph_state import GraphState
Expand Down
7 changes: 2 additions & 5 deletions qiskit/circuit/library/data_preparation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
from .pauli_feature_map import PauliFeatureMap
from .z_feature_map import ZFeatureMap
from .zz_feature_map import ZZFeatureMap
from .state_preparation import StatePreparation

__all__ = [
"PauliFeatureMap",
"ZFeatureMap",
"ZZFeatureMap",
]
__all__ = ["PauliFeatureMap", "ZFeatureMap", "ZZFeatureMap", "StatePreparation"]
Loading

0 comments on commit c318725

Please sign in to comment.