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

Commit

Permalink
Fix num oracle queries in QAE (#1242)
Browse files Browse the repository at this point in the history
* fix num oracle queries

* add reno

* fix statevector case

Co-authored-by: Manoel Marques <Manoel.Marques@ibm.com>
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 15, 2020
1 parent 5f52856 commit 01efe24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion qiskit/aqua/algorithms/amplitude_estimators/ae.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def _run(self) -> 'AmplitudeEstimationResult':
self._ret['value'] = val

# count the number of Q-oracle calls
self._ret['num_oracle_queries'] = self._M - 1
self._ret['num_oracle_queries'] = self._ret['shots'] * (self._M - 1)

# get MLE
self._run_mle()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fixes:
- |
For the amplitude estimation algorithms, we define the number of oracle queries
as number of times the Q operator/Grover operator is applied. This includes
the number of shots. That factor has been included in MLAE and IQAE but
was missing in the 'standard' QAE.

0 comments on commit 01efe24

Please # to comment.