• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit-aqua / 4455
84%

Build:
DEFAULT BRANCH: master
Ran 11 Aug 2020 08:25PM UTC
Jobs 1
Files 352
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
4455

push

travis-ci-com

web-flow
Fix cyclicity check and add max_iterations in VQEAdapt (#1187)

* Fix incorrect cycle detection in VQEAdapt

Fixes #1184

The previous regex used for cyclicity detection had the problem of not
restricting itself to checking whole numbers. Thus, it would detect a
cycle even if only single digits of the indices repeated (e.g. as in
[190, 126, 62] where the 6 "repeats").
This bug is fixed by ensuring that the regex will only detect sequences
of at least two whole numbers in a row.

Since this change would allow single numbers to repeat indefinitely, the
case of single repeating indices is handled explicitly for the last two
entries. Due to the iterative nature of the algorithm this suffices to
catch all intermediate steps, too.

In order to allow the simple unittesting of this functionality, it has
been extracted into a separate method of the VQEAdapt class.

* Add max_iterations option to VQEAdapt

As suggested in #1184

* Add releasenote

* Fix spelling

* Fix cycle regex to allow sequences longer than 2

The previous introduction of the word boundaries around the numbers of
the first regex group resulted in the regex being unable to detect
sequences of any length other than two.
That was the also the initial reason for using ".+" rather than "\d+"
which allows multiple numbers to be matched. Due to the regex greedy
matching "(.+ .+)" will now truely try match as many numbers as possible
(starting from at least two).

The word boundaries around "\1" still ensure that we are correctly
detecting a pattern of whole numbers and don't split them into digits.

* Re-add some word boundaries in cycle_regex.

* Check some additional index patterns

* Update doc string

Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>

Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>

18609 of 22451 relevant lines covered (82.89%)

0.83 hits per line

Jobs
ID Job ID Ran Files Coverage
16 4455.16 (DEPENDENCY_BRANCH=$(if [[ "$TRAVIS_BRANCH" == stable* ]]; then echo "stable"; else echo "master"; fi) INIT_FILE="$TRAVIS_BUILD_DIR/qiskit/__init__.py") 11 Aug 2020 08:25PM UTC 0
82.89
Travis Job 4455.16
Source Files on build 4455
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #4455
  • 50e4d935 on github
  • Prev Build on master (#4447)
  • Next Build on master (#4464)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc