Giter VIP home page Giter VIP logo

Comments (5)

Raghav-Bell avatar Raghav-Bell commented on August 19, 2024

It seems in your algorithm there is an infinite loop. Following are the places where you can find it:

  1. Check len(paramaters) if len(paramaters) >>1 then it will take long time to complete.
  2. Check your hamiltonian, loss function, or any other observable if it is diverging (hence cannot be converged).
    Tip:
    For optimization problems use tqdm and GPUs or HPCs as they take alot time.

from qiskit-tutorials.

OuCheng-Fu avatar OuCheng-Fu commented on August 19, 2024

It seems in your algorithm there is an infinite loop. Following are the places where you can find it:

  1. Check len(paramaters) if len(paramaters) >>1 then it will take long time to complete.
  2. Check your hamiltonian, loss function, or any other observable if it is diverging (hence cannot be converged).
    Tip:
    For optimization problems use tqdm and GPUs or HPCs as they take alot time.

I run my 4-vertex example by copying the whole notebook code on Google colab, adding
print(len(parameters))
after the original code, and run it in the same time, it currently ran for 4 hours, and the length did not have an output.

from qiskit-tutorials.

OuCheng-Fu avatar OuCheng-Fu commented on August 19, 2024

It seems in your algorithm there is an infinite loop. Following are the places where you can find it:

  1. Check len(paramaters) if len(paramaters) >>1 then it will take long time to complete.
  2. Check your hamiltonian, loss function, or any other observable if it is diverging (hence cannot be converged).
    Tip:
    For optimization problems use tqdm and GPUs or HPCs as they take alot time.

I run my 4-vertex example by copying the whole notebook code on Google colab, adding print(len(parameters)) after the original code, and run it in the same time, it currently ran for 4 hours, and the length did not have an output.

After 12 hours, my notebook on Google Colab stopped running after the kernel stopped automatically, the picture is here:
ζˆͺεœ– 2023-07-11 上午2 55 10
The length of parameters is still not given.

from qiskit-tutorials.

Raghav-Bell avatar Raghav-Bell commented on August 19, 2024

Hey! @OuCheng-Fu i can understand how it feels to wait hrs to get results. For debugging purposes please share your code or colab notebook so that i can better understand problem . I really suggest to not use git /github platform for code discussions use slack or stack overflow for that.

from qiskit-tutorials.

OuCheng-Fu avatar OuCheng-Fu commented on August 19, 2024

Hey! @OuCheng-Fu i can understand how it feels to wait hrs to get results. For debugging purposes please share your code or colab notebook so that i can better understand problem . I really suggest to not use git /github platform for code discussions use slack or stack overflow for that.

The python code on colab notebook is here:
https://colab.research.google.com/drive/1J_iw_vTHkDXpNyX5GwN9HOuTXbeBsNsN?usp=sharing
it is also on slack:
https://qiskit.slack.com/archives/CB6C24TPB/p1689016161818919?thread_ts=1688397470.409429&cid=CB6C24TPB
Thank you for reply.

from qiskit-tutorials.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.