Skip to content

Commit

Permalink
Merge branch 'main' into controlflow/dense_layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ewinston committed Sep 28, 2022
2 parents e390d47 + 4a857f6 commit 3009590
Show file tree
Hide file tree
Showing 304 changed files with 11,285 additions and 5,885 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ qiskit/utils/ @Qiskit/terra-core @manoelmarques @woodsp-ibm
providers/ @Qiskit/terra-core @jyu00
quantum_info/ @Qiskit/terra-core @ikkoham
qpy/ @Qiskit/terra-core @nkanazawa1989
pulse/ @Qiskit/terra-core @eggerdj @nkanazawa1989 @danpuzzuoli
scheduler/ @Qiskit/terra-core @eggerdj @nkanazawa1989 @danpuzzuoli
pulse/ @Qiskit/terra-core @eggerdj @nkanazawa1989 @wshanks
scheduler/ @Qiskit/terra-core @eggerdj @nkanazawa1989 @wshanks
visualization/ @Qiskit/terra-core @nonhermitian @nkanazawa1989
primitives/ @Qiskit/terra-core @ikkoham @t-imamichi
# Override the release notes directories to have _no_ code owners, so any review
Expand Down
52 changes: 47 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,56 @@ jobs:
name: Install Python
with:
python-version: '3.8'
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: default
components: llvm-tools-preview
- name: Install dependencies
run: pip install tox coveragepy-lcov
- name: Run coverage report
run: tox -ecoverage
run: |
pip install coveragepy-lcov
sudo apt-get install lcov
- name: Download grcov for rust coverage
run: curl -L https://github.com/mozilla/grcov/releases/download/v0.8.11/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar xj
- name: Build and install qiskit-terra
run: pip install -e .
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Cinstrument-coverage"
LLVM_PROFILE_FILE: "qiskit-%p-%m.profraw"
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
- name: Convert to lcov
run: coveragepy-lcov --output_file_path coveralls.info
- name: Generate unittest coverage report
run: |
set -e
pip install -r requirements-dev.txt qiskit-aer
stestr run
./grcov . --binary-path ./target/debug/ -s . --llvm --parallel -t lcov --branch --ignore-not-existing --ignore "/*" -o ./rust_unittest.info
mkdir rust_lcov
mv ./rust_unittest.info rust_lcov/.
rm *profraw
env:
QISKIT_TEST_CAPTURE_STREAMS: 1
QISKIT_PARALLEL: FALSE
PYTHON: "coverage3 run --source qiskit --parallel-mode"
- name: Generate parallel_map test
run: |
set -e
coverage3 run --source qiskit --parallel-mode ./tools/verify_parallel_map.py
./grcov . --binary-path ./target/debug/ -s . --llvm --parallel -t lcov --branch --ignore-not-existing --ignore "/*" -o ./rust_parallel_map.info
mv rust_lcov/rust_unittest.info .
env:
QISKIT_TEST_CAPTURE_STREAMS: 1
QISKIT_PARALLEL: FALSE
PYTHON: "coverage3 run --source qiskit --parallel-mode"
- name: Convert to lcov and combine data
run: |
set -e
coverage3 combine
coveragepy-lcov --output_file_path python.info
lcov --add-tracefile python.info -a rust_unittest.info -a rust_parallel_map.info -o combined.info
lcov --remove combined.info "target/*" -o coveralls.info
- name: Coveralls
uses: coverallsapp/github-action@master
with:
Expand Down
85 changes: 63 additions & 22 deletions qiskit/algorithms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,14 @@
VQD
Variational Quantum Time Evolution
----------------------------------
Classes used by variational quantum time evolution algorithms - VarQITE and VarQRTE.
.. autosummary::
:toctree: ../stubs/
evolvers.variational
Evolvers
--------
Pending deprecation: This package has been superseded by the package below. It will be
deprecated in a future release and subsequently removed after that:
`Time Evolvers`_
Algorithms to evolve quantum states in time. Both real and imaginary time evolution is possible
with algorithms that support them. For machine learning, Quantum Imaginary Time Evolution might be
used to train Quantum Boltzmann Machine Neural Networks for example.
Expand All @@ -119,14 +113,40 @@
RealEvolver
ImaginaryEvolver
TrotterQRTE
VarQITE
VarQRTE
PVQD
PVQDResult
EvolutionResult
EvolutionProblem
Time Evolvers
-------------
Primitives-enabled algorithms to evolve quantum states in time. Both real and imaginary time
evolution is possible with algorithms that support them. For machine learning, Quantum Imaginary
Time Evolution might be used to train Quantum Boltzmann Machine Neural Networks for example.
.. autosummary::
:toctree: ../stubs/
:nosignatures:
RealTimeEvolver
ImaginaryTimeEvolver
PVQD
PVQDResult
TimeEvolutionResult
TimeEvolutionProblem
Trotterization-based Quantum Real Time Evolution
------------------------------------------------
Package for primitives-enabled Trotterization-based quantum time evolution algorithm - TrotterQRTE.
.. autosummary::
:toctree: ../stubs/
time_evolvers.trotterization
Factorizers
-----------
Expand Down Expand Up @@ -163,10 +183,12 @@
linear_solvers
Minimum Eigensolvers
--------------------
Minimum Eigen Solvers
---------------------
Algorithms that can find the minimum eigenvalue of an operator.
These algorithms are pending depreciation. One should instead make use of the
Minimum Eigensolver classes in the section below, which leverage Runtime primitives.
.. autosummary::
:toctree: ../stubs/
Expand All @@ -183,6 +205,16 @@
QAOA
VQE
Minimum Eigensolvers
--------------------
Algorithms that can find the minimum eigenvalue of an operator and leverage primitives.
.. autosummary::
:toctree: ../stubs/
minimum_eigensolvers
Optimizers
----------
Expand Down Expand Up @@ -222,6 +254,7 @@
state_fidelities
Exceptions
----------
Expand All @@ -240,6 +273,8 @@
:toctree: ../stubs/
eval_observables
estimate_observables
Utility classes
---------------
Expand All @@ -257,6 +292,10 @@
from .evolvers import EvolutionResult, EvolutionProblem
from .evolvers.real_evolver import RealEvolver
from .evolvers.imaginary_evolver import ImaginaryEvolver
from .time_evolvers.imaginary_time_evolver import ImaginaryTimeEvolver
from .time_evolvers.real_time_evolver import RealTimeEvolver
from .time_evolvers.time_evolution_problem import TimeEvolutionProblem
from .time_evolvers.time_evolution_result import TimeEvolutionResult
from .variational_algorithm import VariationalAlgorithm, VariationalResult
from .amplitude_amplifiers import Grover, GroverResult, AmplificationProblem, AmplitudeAmplifier
from .amplitude_estimators import (
Expand Down Expand Up @@ -293,11 +332,10 @@
)
from .exceptions import AlgorithmError
from .aux_ops_evaluator import eval_observables
from .observables_evaluator import estimate_observables
from .evolvers.trotterization import TrotterQRTE
from .evolvers.variational.var_qite import VarQITE
from .evolvers.variational.var_qrte import VarQRTE

from .evolvers.pvqd import PVQD, PVQDResult
from .time_evolvers.pvqd import PVQD, PVQDResult

__all__ = [
"AlgorithmJob",
Expand All @@ -322,11 +360,13 @@
"NumPyEigensolver",
"RealEvolver",
"ImaginaryEvolver",
"RealTimeEvolver",
"ImaginaryTimeEvolver",
"TrotterQRTE",
"VarQITE",
"VarQRTE",
"EvolutionResult",
"EvolutionProblem",
"TimeEvolutionResult",
"TimeEvolutionProblem",
"LinearSolverResult",
"Eigensolver",
"EigensolverResult",
Expand All @@ -352,4 +392,5 @@
"IterativePhaseEstimation",
"AlgorithmError",
"eval_observables",
"estimate_observables",
]
2 changes: 2 additions & 0 deletions qiskit/algorithms/amplitude_amplifiers/amplitude_amplifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def __init__(self) -> None:
self._top_measurement = None
self._assignment = None
self._oracle_evaluation = None
self._circuit_results = None
self._max_probability = None

@property
def top_measurement(self) -> Optional[str]:
Expand Down
Loading

0 comments on commit 3009590

Please sign in to comment.