question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

QNSPSA produces irreproducible results

See original GitHub issue

Information

  • Qiskit Terra version: qiskit-terra 0.17.0
  • Python version: Python 3.7.3
  • Operating system: MacOS Big Sur 11.6

What is the current behavior?

Executing a QNSPSA optimization with the same random seed gives different results. We checked that the same optimization gives reproducible results with other optimizers such as ADAM.

Steps to reproduce the problem

Run an arbitrary optimization, e.g., VQE with QNSPSA, and compare the results.

What is the expected behavior?

The same results for the same seed.

Suggested solutions

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jakelishmancommented, Sep 28, 2021

We should make sure that the documentation for the QNSPSA class also includes the same note about setting the global seed, since users probably won’t see it with it just being on a parent class. Hopefully this is the issue here.

1reaction
jakelishmancommented, Sep 28, 2021

Great to hear! I’ll just leave this open for now as a reminder to ourselves to update the documentation in the class.

Read more comments on GitHub >

github_iconTop Results From Across the Web

qnspsa
The QN-SPSA optimizer [1] is a stochastic optimizer that belongs to the family of gradient descent methods. This optimizer is based on SPSA...
Read more >
Quantum natural SPSA optimizer
In 1, Gacon et al. propose QN-SPSA, which is tailored for quantum algorithms. In each optimization step, QN-SPSA executes only 2 quantum ...
Read more >
HTML report does not display any info - Flank/Flank - IssueHint
QNSPSA produces irreproducible results, 5, 2021-09-28, 2022-10-08. Client-side Routing: Setup IPFS pool cache, 0, 2021-09-14, 2022-09-28.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found