Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
4.84k stars 2.29k forks source link

Syntax error in SamplerV2 examples #12323

Open rsatoh-c opened 2 months ago

rsatoh-c commented 2 months ago

URL to the relevant documentation

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

Select all that apply

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}"))
abbycross commented 2 months ago

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.