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

Commit 5d7a8cb

Browse files
Update docs for new Chemistry functionality (#1359)
* Update docs for new chemistry content * Delete blank lines * fix lint and spell Co-authored-by: Manoel Marques <Manoel.Marques@ibm.com>
1 parent 75c108c commit 5d7a8cb

File tree

23 files changed

+357
-66
lines changed

23 files changed

+357
-66
lines changed

.pylintdict

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ anc
2121
ancilla
2222
ancillae
2323
ancillas
24+
ang
2425
anharmonic
2526
annealers
2627
ansatz
@@ -528,6 +529,7 @@ piecewise
528529
plesset
529530
pmatrix
530531
pooya
532+
Popovas
531533
postoracle
532534
powell
533535
pre
@@ -538,6 +540,7 @@ preoracle
538540
prepend
539541
prepending
540542
preprint
543+
Preprocesses
541544
preprocessing
542545
priori
543546
probs
@@ -635,6 +638,7 @@ seealso
635638
seeley
636639
sergey
637640
setia
641+
setted
638642
sgn
639643
shanno
640644
shor
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _qiskit-chemistry-algorithms-pes_samplers:
2+
3+
.. automodule:: qiskit.chemistry.algorithms.pes_samplers
4+
:no-members:
5+
:no-inherited-members:
6+
:no-special-members:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _qiskit-chemistry-results:
2+
3+
.. automodule:: qiskit.chemistry.results
4+
:no-members:
5+
:no-inherited-members:
6+
:no-special-members:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _qiskit-chemistry-transformations:
2+
3+
.. automodule:: qiskit.chemistry.transformations
4+
:no-members:
5+
:no-inherited-members:
6+
:no-special-members:

qiskit/chemistry/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,13 @@
147147
.. autosummary::
148148
:toctree:
149149
150-
applications
151150
algorithms
151+
applications
152152
components
153153
core
154154
drivers
155+
results
156+
transformations
155157
156158
"""
157159

qiskit/chemistry/algorithms/__init__.py

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,141 @@
2828
++++++++++++
2929
Algorithms that can find the eigenvalues of an operator, i.e. excited states for chemistry.
3030
31+
**DEPRECATED** See the Excited States Solvers section below
32+
3133
.. autosummary::
3234
:toctree: ../stubs/
3335
:nosignatures:
3436
3537
QEomVQE
3638
QEomEE
3739
40+
Excited State Solvers
41+
+++++++++++++++++++++
42+
Algorithms that can find the eigenvalues of an operator, i.e. excited states for chemistry.
43+
44+
The interface for such solvers,
45+
46+
.. autosummary::
47+
:toctree: ../stubs/
48+
:nosignatures:
49+
50+
ExcitedStatesSolver
51+
52+
the solvers themselves
53+
54+
.. autosummary::
55+
:toctree: ../stubs/
56+
:nosignatures:
57+
58+
ExcitedStatesEigensolver
59+
QEOM
60+
61+
and factories to provision Quantum and/or Classical algorithms upon which the above solvers may
62+
depend
63+
64+
.. autosummary::
65+
:toctree: ../stubs/
66+
:nosignatures:
67+
68+
EigensolverFactory
69+
NumPyEigensolverFactory
70+
71+
Ground State Solvers
72+
++++++++++++++++++++
73+
Algorithms that can find the minimum eigenvalue of an operator, i.e. ground state for chemistry.
74+
75+
The interface for such solvers,
76+
77+
.. autosummary::
78+
:toctree: ../stubs/
79+
:nosignatures:
80+
81+
GroundStateSolver
82+
83+
the solvers themselves
84+
85+
.. autosummary::
86+
:toctree: ../stubs/
87+
:nosignatures:
88+
89+
AdaptVQE
90+
GroundStateEigensolver
91+
OrbitalOptimizationVQE
92+
93+
and factories to provision Quantum and/or Classical algorithms upon which the above solvers may
94+
depend
95+
96+
.. autosummary::
97+
:toctree: ../stubs/
98+
:nosignatures:
99+
100+
MinimumEigensolverFactory
101+
NumPyMinimumEigensolverFactory
102+
VQEUCCSDFactory
103+
VQEUVCCSDFactory
104+
38105
Minimum Eigensolvers
39106
++++++++++++++++++++
40107
Algorithms that can find the minimum eigenvalue of an operator, i.e. ground state for chemistry.
41108
109+
**DEPRECATED** See the Ground State Solvers section above
110+
42111
.. autosummary::
43112
:toctree: ../stubs/
44113
:nosignatures:
45114
46115
VQEAdapt
47116
117+
118+
Potential Energy Surface Samplers
119+
+++++++++++++++++++++++++++++++++
120+
Algorithms that can compute potential energy surfaces.
121+
122+
.. autosummary::
123+
:toctree: ../stubs/
124+
:nosignatures:
125+
126+
BOPESSampler
127+
128+
The samplers include extrapolators to facilitate convergence across a set of points and support
129+
of various potentials. More detail may be found in the sub-module linked below
130+
131+
.. autosummary::
132+
:toctree:
133+
134+
pes_samplers
135+
48136
"""
49137

50138
from .eigen_solvers import QEomVQE, QEomEE
51139
from .minimum_eigen_solvers import VQEAdapt, VQEAdaptResult
52140

141+
from .excited_states_solvers import (ExcitedStatesEigensolver, ExcitedStatesSolver, QEOM,
142+
EigensolverFactory, NumPyEigensolverFactory)
143+
from .ground_state_solvers import (AdaptVQE, GroundStateEigensolver, GroundStateSolver,
144+
OrbitalOptimizationVQE, MinimumEigensolverFactory,
145+
NumPyMinimumEigensolverFactory, VQEUCCSDFactory,
146+
VQEUVCCSDFactory)
147+
from .pes_samplers import BOPESSampler
148+
53149
__all__ = [
54150
'QEomVQE',
55151
'QEomEE',
56152
'VQEAdapt',
57153
'VQEAdaptResult',
154+
'ExcitedStatesEigensolver',
155+
'ExcitedStatesSolver',
156+
'QEOM',
157+
'EigensolverFactory',
158+
'NumPyEigensolverFactory',
159+
'AdaptVQE',
160+
'GroundStateEigensolver',
161+
'GroundStateSolver',
162+
'OrbitalOptimizationVQE',
163+
'MinimumEigensolverFactory',
164+
'NumPyMinimumEigensolverFactory',
165+
'VQEUCCSDFactory',
166+
'VQEUVCCSDFactory',
167+
'BOPESSampler',
58168
]

qiskit/chemistry/algorithms/excited_states_solvers/eigensolver_factories/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
"""Factories that create an eigensolver based on a qubit transformation."""
1414

15-
1615
from .eigensolver_factory import EigensolverFactory
1716
from .numpy_eigensolver_factory import NumPyEigensolverFactory
1817

qiskit/chemistry/algorithms/excited_states_solvers/excited_states_solver.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@ def solve(self, driver: BaseDriver,
2828
aux_operators: Optional[Union[List[FermionicOperator],
2929
List[BosonicOperator]]] = None
3030
) -> Union[ElectronicStructureResult, VibronicStructureResult]:
31-
"""Compute the excited states energies of the molecule that was supplied via the driver.
31+
r"""Compute the excited states energies of the molecule that was supplied via the driver.
32+
3233
Args:
3334
driver: a chemistry driver object which defines the chemical problem that is to be
34-
solved by this calculation.
35+
solved by this calculation.
3536
aux_operators: Additional auxiliary operators to evaluate. Must be of type
3637
``FermionicOperator`` if the qubit transformation is fermionic and of type
3738
``BosonicOperator`` it is bosonic.
39+
3840
Returns:
3941
an eigenstate result
4042
"""

qiskit/chemistry/algorithms/ground_state_solvers/adapt_vqe.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(self,
5151
solver: a factory for the VQE solver employing a UCCSD variational form.
5252
threshold: the energy convergence threshold. It has a minimum value of 1e-15.
5353
delta: the finite difference step size for the gradient computation. It has a minimum
54-
value of 1e-5.
54+
value of 1e-5.
5555
max_iterations: the maximum number of iterations of the AdaptVQE algorithm.
5656
"""
5757
validate_min('threshold', threshold, 1e-15)
@@ -141,12 +141,12 @@ def solve(self,
141141
142142
Args:
143143
driver: a chemistry driver.
144-
aux_operators: Additional auxiliary ``FermionicOperator``s to evaluate at the
144+
aux_operators: Additional auxiliary ``FermionicOperator`` instances to evaluate at the
145145
ground state.
146146
147147
Raises:
148-
AquaError: if a solver other than VQE or a variational form other than UCCSD is provided
149-
or if the algorithm finishes due to an unforeseen reason.
148+
AquaError: if a solver other than VQE or a variational form other than UCCSD is
149+
provided or if the algorithm finishes due to an unforeseen reason.
150150
151151
Returns:
152152
An AdaptVQEResult which is an ElectronicStructureResult but also includes runtime

qiskit/chemistry/algorithms/pes_samplers/__init__.py

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,68 @@
1010
# copyright notice, and modified files need to carry a notice indicating
1111
# that they have been altered from the originals.
1212

13-
"""Potential energy surface samplers"""
13+
"""
14+
Potential energy surface samplers (:mod:`qiskit.chemistry.algorithms.pes_samplers`)
15+
===================================================================================
16+
Potential energy surface samplers.
17+
18+
.. currentmodule:: qiskit.chemistry.algorithms.pes_samplers
19+
20+
Algorithms that can compute potential energy surfaces.
21+
22+
.. autosummary::
23+
:toctree: ../stubs/
24+
:nosignatures:
25+
26+
BOPESSampler
27+
28+
When used with variational solvers, such as VQE, when computing a set of points there is support
29+
for extrapolation from prior solution(s) to bootstrap the algorithm with a better starting point
30+
to facilitate convergence. Extrapolators are:
31+
32+
.. autosummary::
33+
:toctree: ../stubs/
34+
:nosignatures:
35+
36+
Extrapolator
37+
DifferentialExtrapolator
38+
PCAExtrapolator
39+
PolynomialExtrapolator
40+
SieveExtrapolator
41+
WindowExtrapolator
42+
43+
There is also a set of support function for potentials:
44+
45+
.. autosummary::
46+
:toctree: ../stubs/
47+
:nosignatures:
48+
49+
EnergySurface1DSpline
50+
HarmonicPotential
51+
MorsePotential
52+
EnergySurfaceBase
53+
PotentialBase
54+
VibronicStructureBase
55+
"""
1456

1557
from .bopes_sampler import BOPESSampler
58+
from .extrapolator import (Extrapolator, DifferentialExtrapolator, PCAExtrapolator,
59+
PolynomialExtrapolator, SieveExtrapolator, WindowExtrapolator)
60+
from .potentials import (EnergySurface1DSpline, HarmonicPotential, MorsePotential,
61+
EnergySurfaceBase, PotentialBase, VibronicStructureBase)
1662

17-
__all__ = ['BOPESSampler'
18-
]
63+
__all__ = [
64+
'BOPESSampler',
65+
'Extrapolator',
66+
'DifferentialExtrapolator',
67+
'PCAExtrapolator',
68+
'PolynomialExtrapolator',
69+
'SieveExtrapolator',
70+
'WindowExtrapolator',
71+
'EnergySurface1DSpline',
72+
'HarmonicPotential',
73+
'MorsePotential',
74+
'EnergySurfaceBase',
75+
'PotentialBase',
76+
'VibronicStructureBase',
77+
]

0 commit comments

Comments
 (0)