Skip to content

Commit c318725

Browse files
javabsterCryorismergify[bot]
authored
Separate State Preparation from Initialize (Qiskit#7666)
* 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 <[email protected]> * Moved stateprep to circuit library * Adjust label logic * Update qiskit/circuit/library/data_preparation/state_preparation.py Co-authored-by: Julien Gacon <[email protected]> * Update qiskit/circuit/library/data_preparation/state_preparation.py Co-authored-by: Julien Gacon <[email protected]> * Update qiskit/circuit/library/data_preparation/state_preparation.py Co-authored-by: Julien Gacon <[email protected]> * Fixed docstrings and tests * Update qiskit/circuit/library/data_preparation/state_preparation.py Co-authored-by: Julien Gacon <[email protected]> * Added repeat test * Added test and reno * Fix label issue * Fixed docstrings * ✨ Lint! ✨ Co-authored-by: Julien Gacon <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent a540794 commit c318725

File tree

8 files changed

+736
-337
lines changed

8 files changed

+736
-337
lines changed

qiskit/circuit/library/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@
262262
PauliFeatureMap
263263
ZFeatureMap
264264
ZZFeatureMap
265+
StatePreparation
265266
266267
NCT (Not-CNOT-Toffoli) template circuits
267268
========================================
@@ -416,7 +417,7 @@
416417
ExcitationPreserving,
417418
QAOAAnsatz,
418419
)
419-
from .data_preparation import PauliFeatureMap, ZFeatureMap, ZZFeatureMap
420+
from .data_preparation import PauliFeatureMap, ZFeatureMap, ZZFeatureMap, StatePreparation
420421
from .quantum_volume import QuantumVolume
421422
from .fourier_checking import FourierChecking
422423
from .graph_state import GraphState

qiskit/circuit/library/data_preparation/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
from .pauli_feature_map import PauliFeatureMap
4242
from .z_feature_map import ZFeatureMap
4343
from .zz_feature_map import ZZFeatureMap
44+
from .state_preparation import StatePreparation
4445

45-
__all__ = [
46-
"PauliFeatureMap",
47-
"ZFeatureMap",
48-
"ZZFeatureMap",
49-
]
46+
__all__ = ["PauliFeatureMap", "ZFeatureMap", "ZZFeatureMap", "StatePreparation"]

0 commit comments

Comments
 (0)