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
Replace the InitialState components by circuits #1374
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
fb4fc42
make chemistry initial states circuits
Cryoris 26299e7
put VSCF circuit in new file
Cryoris 1ba963d
update several tests
Cryoris b6e2022
fix type change to tuple
Cryoris 546e0ae
merge hf initial state and circuit
Cryoris 4eebf01
merge initstate+circuit
Cryoris 2b8f57f
merge initstate+circuit
Cryoris 8cec413
update EOH
Cryoris 131e5aa
update hhl and qaia
Cryoris 1f696f2
update chc and uvcc
Cryoris 72d3b31
deprecate InitialState components
Cryoris 8019dbb
update varformbased test
Cryoris 96d5eb8
fix running tests & mypy
Cryoris ac2970d
add reno
Cryoris e0f7553
update more tests
Cryoris 22b77d1
Merge branch 'master' into initial-state
Cryoris 9a09cf7
do not convert sqlist to array
Cryoris e8fff1b
fix iqpe test
Cryoris b94f78e
Merge branch 'master' into initial-state
Cryoris 888047a
fix variable renaming from merge
Cryoris 608aade
move to circuit.lib and use tuple
Cryoris cbf9fac
Merge branch 'master' into initial-state
Cryoris 3dd1eb7
fix mypy
Cryoris 89ae9ae
Merge branch 'initial-state' of github.com:Cryoris/qiskit-aqua into i…
Cryoris aeb35de
make _build_bitstr public functions
Cryoris 174c88e
fix misspelling
Cryoris 0be3a42
Merge branch 'master' into initial-state
Cryoris 7ed93bb
Merge branch 'master' into initial-state
Cryoris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2020. | ||
# | ||
# This code is licensed under the Apache License, Version 2.0. You may | ||
# obtain a copy of this license in the LICENSE.txt file in the root directory | ||
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# Any modifications or derivative works of this code must retain this | ||
# copyright notice, and modified files need to carry a notice indicating | ||
# that they have been altered from the originals. | ||
|
||
""" | ||
=================================================================== | ||
Chemistry Circuit Library (:mod:`qiskit.chemistry.circuit.library`) | ||
=================================================================== | ||
|
||
A collection of circuits used as building blocks or inputs of algorithms in chemistry. | ||
|
||
.. currentmodule:: qiskit.chemistry.circuit.library | ||
|
||
Initial states | ||
============== | ||
|
||
.. autosummary:: | ||
:toctree: ../stubs/ | ||
:nosignatures: | ||
|
||
HartreeFock | ||
VSCF | ||
|
||
""" | ||
|
||
from .initial_states import ( | ||
HartreeFock, | ||
VSCF | ||
) | ||
|
||
__all__ = ['HartreeFock', 'VSCF'] |
18 changes: 18 additions & 0 deletions
18
qiskit/chemistry/circuit/library/initial_states/__init__.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# This code is part of Qiskit. | ||
# | ||
# (C) Copyright IBM 2020. | ||
# | ||
# This code is licensed under the Apache License, Version 2.0. You may | ||
# obtain a copy of this license in the LICENSE.txt file in the root directory | ||
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# Any modifications or derivative works of this code must retain this | ||
# copyright notice, and modified files need to carry a notice indicating | ||
# that they have been altered from the originals. | ||
|
||
"""Initial state circuits.""" | ||
|
||
from .hartree_fock import HartreeFock | ||
from .vscf import VSCF | ||
|
||
__all__ = ['HartreeFock', 'VSCF'] |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is a required change in that initial_state will not accommodate a QuantumCircuit? If it is now done this way it seems the var form will not have visibility to the initial state as it had when it was passed directly and it would prepend it itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had a workaround in place where the NLocal circuits expected a
InitialState
. I'll add support for passing a QuantumCircuit and deprecate the InitialStates once this is merged. We can update the readme sample to use the kwarg again.