Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.

Home Page:https://www.ibm.com/quantum/qiskit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Syntax error in SamplerV2 examples

rsatoh-c opened this issue · comments

URL to the relevant documentation

https://docs.quantum.ibm.com/api/qiskit/primitives#overview-of-samplerv2

Select all that apply

  • typo
  • code bug
  • out-of-date content
  • broken link
  • other

Describe the fix.

In the example code, print functions have redundant parentheses and run is missing closing parenthesis.

print(f"The primitive-job finished with result {job_result}"))
 
# run a sampler job on the parameterized circuits
job2 = sampler.run([(pqc, theta1), (pqc2, theta2)]
job_result = job2.result()
print(f"The primitive-job finished with result {job_result}"))

Hi @rsatoh-c! Looks like this issue should be posted in the qiskit/qiskit repo, which is where the API docs source files live: https://github.com/Qiskit/qiskit/issues/new?assignees=&labels=bug&projects=&template=BUG_REPORT.yaml - can you please open an issue there? Thanks, and I will close this issue here.