documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Fallback to simulator if token not set, explain where to get token from

Open romeokienzler opened this issue 1 month ago • 1 comments

URL to the relevant tutorial

https://quantum.cloud.ibm.com/docs/en/tutorials/quantum-approximate-optimization-algorithm

Select all that apply

  • [x] new content request
  • [ ] typo
  • [x] code bug
  • [x] out-of-date content
  • [ ] broken link
  • [ ] other

Describe the fix or the content request.

fixed in #4280

I've realized it is hard to work with the notebooks since it is not explained how and where to obtain the token/crn.

I've added this explaination and also added a fallback to the simulator in case the token is not set

Also the free backend doesn't seem to support the 'with Session:' directive, therefore I've changed that code block as well.

The notebook now runs fine up to 'Part II. Scale it up!' since 'backend.coupling_map' is called and neither the AerSimulator nor the free tier backend seem to support it

For new content requests - if the request is accepted, do you want to write the content?

I will write (or already have written) a draft of the proposed content

romeokienzler avatar Nov 19 '25 10:11 romeokienzler

Hi @romeokienzler! Thanks for bringing up these issues! A few comments are in order here:

  • There are instructions on how to setup your account in the IBM documentation (see here and adjacent pages)
  • With tutorials we want users to see how to run a full experiment on hardware, therefore we have been focusing on hardware rather than simulators
  • You're right in that Session is not available for open plan user. We should probably add some text to clarify this point but I wouldn't change the code. Sessions have been written specifically for iterative workloads like QAOA so we want to show them in action here.

miamico avatar Nov 19 '25 13:11 miamico

thanks @miamico

romeokienzler avatar Dec 03 '25 07:12 romeokienzler

@miamico I gave a shot on the proposed changes in #4348

romeokienzler avatar Dec 03 '25 07:12 romeokienzler

@miamico #4348 ready to merge

romeokienzler avatar Dec 03 '25 22:12 romeokienzler