Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Projected Variational Quantum Dynamics #8304

Merged
merged 29 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
12c9931
pvqd dradt
Cryoris Nov 10, 2021
f1dc8ec
update as theta + difference
Cryoris Nov 23, 2021
504aea9
black
Cryoris Dec 10, 2021
2f3f7c2
refactor test
Cryoris Dec 14, 2021
ca7fae7
Merge branch 'main' into pvqd
Cryoris Jul 4, 2022
cd3e459
update to new time evo framework
Cryoris Jul 4, 2022
08224cc
Merge branch 'main' into pvqd
Cryoris Jul 6, 2022
32fd387
add gradients
Cryoris Jul 6, 2022
c5b9c12
use gradient only if supported
Cryoris Jul 8, 2022
a361656
polishing!
Cryoris Jul 8, 2022
35c7b28
fix algorithms import
Cryoris Jul 8, 2022
9c0f9ae
changes from code review
Cryoris Jul 15, 2022
3662e16
add more tests for different ops
Cryoris Jul 15, 2022
a084660
refactor PVQD to multiple files
Cryoris Jul 18, 2022
8ecd9ba
remove todo
Cryoris Jul 18, 2022
c7b74aa
comments from review
Cryoris Jul 19, 2022
0d59f71
Merge branch 'main' into pvqd
Cryoris Jul 19, 2022
8d3bcf5
rm OrderedDict from unitary
Cryoris Jul 19, 2022
712184c
changes from code review
Cryoris Jul 26, 2022
c8bab59
remove function to attach intial states
Cryoris Jul 26, 2022
ba088e4
include comments from review
Cryoris Jul 28, 2022
0e4f8ee
Merge branch 'main' into pvqd
Cryoris Jul 28, 2022
2d24ab1
make only quantum instance and optimizer optional, and use num_timesteps
Cryoris Jul 28, 2022
167c100
fix docs
Cryoris Jul 28, 2022
0717168
add comment why Optimizer is optional
Cryoris Jul 29, 2022
3be5d54
use class attributes to document mutable attrs
Cryoris Jul 29, 2022
51e743f
rm duplicate quantum_instance doc
Cryoris Aug 2, 2022
86b6ced
fix attributes docs
Cryoris Aug 3, 2022
10375a0
Merge branch 'main' into pvqd
mergify[bot] Aug 4, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions qiskit/algorithms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@
from .exceptions import AlgorithmError
from .aux_ops_evaluator import eval_observables
from .evolvers.trotterization import TrotterQRTE
from .evolvers.pvqd import PVQD

__all__ = [
"AlgorithmResult",
Expand Down Expand Up @@ -292,6 +293,7 @@
"PhaseEstimationScale",
"PhaseEstimation",
"PhaseEstimationResult",
"PVQD",
Cryoris marked this conversation as resolved.
Show resolved Hide resolved
"IterativePhaseEstimation",
"AlgorithmError",
"eval_observables",
Expand Down
6 changes: 4 additions & 2 deletions qiskit/algorithms/evolvers/evolution_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
self,
hamiltonian: OperatorBase,
time: float,
initial_state: Union[StateFn, QuantumCircuit],
initial_state: Optional[Union[StateFn, QuantumCircuit]] = None,
Cryoris marked this conversation as resolved.
Show resolved Hide resolved
aux_operators: Optional[ListOrDict[OperatorBase]] = None,
truncation_threshold: float = 1e-12,
t_param: Optional[Parameter] = None,
Expand All @@ -41,7 +41,9 @@ def __init__(
Args:
hamiltonian: The Hamiltonian under which to evolve the system.
time: Total time of evolution.
initial_state: Quantum state to be evolved.
initial_state: The quantum state to be evolved for methods like Trotterization.
For variational time evolutions, where the evolution happens in an ansatz,
this argument is not required.
Cryoris marked this conversation as resolved.
Show resolved Hide resolved
aux_operators: Optional list of auxiliary operators to be evaluated with the
evolved ``initial_state`` and their expectation values returned.
truncation_threshold: Defines a threshold under which values can be assumed to be 0.
Expand Down
18 changes: 18 additions & 0 deletions qiskit/algorithms/evolvers/pvqd/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
#
# 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.

"""The projected Variational Quantum Dynamic (p-VQD) module."""

from .pvqd_result import PVQDResult
from .pvqd import PVQD

__all__ = ["PVQD", "PVQDResult"]
Loading