From ed34122e6f6afebe15d39108eb9b0b2962d0ff00 Mon Sep 17 00:00:00 2001 From: Rebecca Dimock Date: Thu, 19 Sep 2024 14:28:29 -0500 Subject: [PATCH 1/9] Fix QASM examples --- docs/guides/primitives-rest-api.mdx | 159 +++++++++++++++++++++++++--- docs/guides/transpile-rest-api.mdx | 6 +- 2 files changed, 149 insertions(+), 16 deletions(-) diff --git a/docs/guides/primitives-rest-api.mdx b/docs/guides/primitives-rest-api.mdx index e2c9cbfe00..532eb81477 100644 --- a/docs/guides/primitives-rest-api.mdx +++ b/docs/guides/primitives-rest-api.mdx @@ -290,7 +290,7 @@ Find details on how to initialize your account, view available backends, and inv You need at least one circuit as the input to the Sampler primitive. -Define a QASM quantum circuit: +Define a QASM quantum circuit: ```python qasm_string=''' @@ -302,7 +302,7 @@ x q[0]; cx q[0], q[1]; c[0] = measure q[0]; c[1] = measure q[1]; -''' +''' ``` @@ -328,11 +328,11 @@ headers = { } job_input = { 'program_id': 'sampler', - "backend": backend, + "backend": backend, "hub": "hub1", "group": "group1", "project": "project1", - "start_session": "False", # set to False if you just need to run a single job. + "start_session": "False", # set to False if you just need to run a single job. "params": { "pubs": [[resulting_qasm],[resulting_qasm,None,500]], # primitive unified blocs (PUBs) containing one circuit each. c.f. https://docs.quantum.ibm.com/migration-guides/v2-primitives "version": 2 # this defines the version of the Qiskit Runtime Primitive to use, c.f. https://docs.quantum.ibm.com/migration-guides/v2-primitives @@ -384,9 +384,9 @@ Output Error mitigation techniques allow users to mitigate circuit errors by modeling the device noise at the time of execution. This typically results in quantum pre-processing overhead related to model training, and classical post-processing overhead to mitigate errors in the raw results by using the generated model. The error mitigation techniques built in to primitives are advanced resilience options. To specify these options, use the `resilience_level` option when submitting your job. -Sampler V2 does not support specifying resilience levels. However, you can turn on or off individual error mitigation / suppression methods. +Sampler V2 does not support specifying resilience levels. However, you can turn on or off individual error mitigation / suppression methods. -The following examples demonstrate the default options for dynamical decoupling and twirling. Find more options and further details in the [Error mitigation and suppression techniques](./error-mitigation-and-suppression-techniques) topic. +The following examples demonstrate the default options for dynamical decoupling and twirling. Find more options and further details in the [Error mitigation and suppression techniques](./error-mitigation-and-suppression-techniques) topic. @@ -403,16 +403,16 @@ headers = { } job_input = { 'program_id': 'sampler', - "backend": backend, + "backend": backend, "hub": "hub1", "group": "group1", "project": "project1", - "start_session": "False", # set to False if you just need to run a single job. + "start_session": "False", # set to False if you just need to run a single job. "params": { "pubs": [[resulting_qasm]], # primitive unified blocs (PUBs) containing one circuit each. c.f. https://docs.quantum.ibm.com/migration-guides/v2-primitives "version": 2, # this defines the version of the Qiskit Runtime Primitive to use, c.f. https://docs.quantum.ibm.com/migration-guides/v2-primitives "options": { - "dynamical_decoupling": { + "dynamical_decoupling": { "enable": True, "sequence_type": 'XpXm', "extra_slack_distribution": 'middle', @@ -446,17 +446,17 @@ headers = { } job_input = { 'program_id': 'sampler', - "backend": backend, + "backend": backend, "hub": "hub1", "group": "group1", "project": "project1", - "start_session": "False", # set to False if you just need to run a single job. + "start_session": "False", # set to False if you just need to run a single job. "params": { "pubs": [[resulting_qasm]], # primitive unified blocs (PUBs) containing one circuit each. c.f. https://docs.quantum.ibm.com/migration-guides/v2-primitives "version": 2, # this defines the version of the Qiskit Runtime Primitive to use, c.f. https://docs.quantum.ibm.com/migration-guides/v2-primitives "options": { - "twirling": { - "enable_gates": True, + "twirling": { + "enable_gates": True, "enable_measure": True, "num_randomizations": "auto", "shots_per_randomization": "auto", @@ -479,6 +479,139 @@ else: + +## Sampler primitive with REST API and parameterized circuits + +### 1. Initialize the account + +Because Qiskit Runtime Sampler is a managed service, you first need to initialize your account. You can then select the device you want to use to run your calculations on. + +Find details on how to initialize your account, view available backends, and invalidate tokens in this [topic](./setup-channel#set-up-to-use-ibm-quantum-platform-with-rest-api). + +### 2. Define parameters + +```python +import requests +import qiskit_ibm_runtime +# Imports from Qiskit Runtime +from qiskit_ibm_runtime import QiskitRuntimeService + +from qiskit.qasm3 import dumps +from qiskit import QuantumCircuit +from qiskit.circuit import Parameter +from qiskit import transpile, assemble, qasm3 +from qiskit.converters import circuit_to_dag, dag_to_circuit +from qiskit.quantum_info import Statevector + +service = QiskitRuntimeService(channel='ibm_quantum') + +theta = Parameter('theta') +phi = Parameter('phi') +parameter_values = {'theta': 1.57, 'phi': 3.14} # In case we want to pass a dictionary +``` + + +### 3. Create a quantum circuit and add parameterized gates + +```python +qc = QuantumCircuit(2) + +# Add parameterized gates +qc.rx(theta, 0) +qc.ry(phi, 1) +qc.cx(0, 1) +qc.measure_all() + +# Draw the original circuit +qc.draw('mpl') + +# Get an ISA circuit +isa_circuit= pm.run(qc) +``` + +### 4. Generate QASM 3 code + +```python +qasm_str = dumps(isa_circuit) +print("Generated QASM 3 code:") +print(qasm_str) +``` + +### 5. Run the quantum circuit using Sampler V2 API + + + + The jobs below use [Qiskit Runtime V2 primitives](/migration-guides/v2-primitives). Both `SamplerV2` and `EstimatorV2` take one or more primitive unified blocs (PUBs) as the input. Each PUB is a tuple that contains one circuit and the data broadcasted to that circuit, which can be multiple observables and parameters. Each PUB returns a result. + + + +```python +import requests + +url = 'https://api.quantum-computing.ibm.com/runtime/jobs' +headers = { + 'Content-Type': 'application/json', + '"Authorization": f"Bearer xxxxxxx", + 'x-qx-client-application': 'qiskit-version-2/0.39.2/'+'your_application' # specifying the application you might be running from. For an actual Integration project, this option is invaluable to know where jobs are coming from. At this time the "qiskit-version-2/0.39.2/" string is a necessary prefix. + } +job_input = { + 'program_id': 'sampler', + "backend": backend, + "hub": "hub1", + "group": "group1", + "project": "project1", + "start_session": "False", # set to False if you just need to run a single job. + "params": { + # Choose one option: direct parameter transfer or through a dictionary + #"pubs": [[qasm_str,[1,2],500]], # primitive unified blocs (PUBs) containing one circuit each. c.f. https://docs.quantum.ibm.com/migration-guides/v2-primitives + "pubs": [[qasm_str,parameter_values,500]], # primitive unified blocs (PUBs) containing one circuit each. c.f. https://docs.quantum.ibm.com/migration-guides/v2-primitives + "version": 2 # this defines the version of the Qiskit Runtime Primitive to use, c.f. https://docs.quantum.ibm.com/migration-guides/v2-primitives +}} + +response = requests.post(url, headers=headers, json=job_input) + +if response.status_code == 200: + job_id = response.json().get('id') + print("Job created:",response.text) +else: + print(f"Error: {response.status_code}") +``` + +```python +print(response.text) +``` + + +### 6. Check job status and get results + +Next, pass the `job_id` to the API: + +```python +response_status_singlejob= requests.get(url+'/'+job_id, headers=headers) +response_status_singlejob.json().get('state') +``` +Output + +```text +{'status': 'Completed'} +``` + +Get job results: +```python +response_result= requests.get(url+'/'+job_id+'/results', headers=headers) + +res_dict=response_result.json() + +# Get results for the first PUB +counts=res_dict['results'][0]['data']['c']['samples'] + +print(counts[:20]) +``` +Output +```text +['0x1', '0x2', '0x1', '0x2', '0x1', '0x2', '0x0', '0x2', '0x1', '0x1', '0x2', '0x2', '0x1', '0x1', '0x1', '0x1', '0x1', '0x1', '0x1', '0x1'] +``` + ## Next steps diff --git a/docs/guides/transpile-rest-api.mdx b/docs/guides/transpile-rest-api.mdx index ef29dde222..e98835dc4f 100644 --- a/docs/guides/transpile-rest-api.mdx +++ b/docs/guides/transpile-rest-api.mdx @@ -11,7 +11,7 @@ description: How to transpile quantum circuits using REST APIs. The process of rewriting a given input circuit to match the topology of a specific quantum device, and optimizing the circuit instructions for execution on noisy quantum QPUs, is known as [transpilation](./transpile). -You have two transpilation options: +You have two transpilation options: * Transpile [locally via Qiskit](./defaults-and-configuration-options) before generating the QASM string. @@ -21,7 +21,7 @@ You have two transpilation options: [Transpilation is necessary](https://docs.quantum.ibm.com/announcements/product-updates/2024-02-14-qiskit-runtime-primitives-update) prior to submitting a circuit to IBM® QPUs. -The steps in this topic describe how to transpile a given QASM circuit and obtain results using the Cloud Transpiler REST API, and include suggestions on how to submit the transpiled quantum circuit to IBM compute resources. +The steps in this topic describe how to transpile a given QASM circuit and obtain results using the Cloud Transpiler REST API, and include suggestions on how to submit the transpiled quantum circuit to IBM compute resources. For an example that uses parameterized input, see [Sampler primitive with REST API and parameterized circuits.](/guides/primitives-rest-api#start-sampler-parms) ## Query the Qiskit Transpiler Service @@ -94,7 +94,7 @@ resp = requests.post( - Since there might be cases where it’s more effective not to use AI-enhanced passes, you can set the `ai` parameter to `ai="auto"` to enable the QPU to decide automatically whether to apply the standard Qiskit heuristic passes or the new AI-powered passes, based on the particulars of your circuit. + Since there might be cases where it’s more effective not to use AI-enhanced passes, you can set the `ai` parameter to `ai="auto"` to enable the QPU to decide automatically whether to apply the standard Qiskit heuristic passes or the new AI-powered passes, based on the particulars of your circuit. ## Request results based on the `task_id` From 1ec0be138b8463efdc92f934426a3ec35112b42f Mon Sep 17 00:00:00 2001 From: Rebecca Dimock Date: Mon, 23 Sep 2024 09:55:40 -0500 Subject: [PATCH 2/9] Comments from Alexandre Castellane --- docs/guides/primitives-rest-api.mdx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/guides/primitives-rest-api.mdx b/docs/guides/primitives-rest-api.mdx index 532eb81477..85656954af 100644 --- a/docs/guides/primitives-rest-api.mdx +++ b/docs/guides/primitives-rest-api.mdx @@ -495,15 +495,17 @@ import requests import qiskit_ibm_runtime # Imports from Qiskit Runtime from qiskit_ibm_runtime import QiskitRuntimeService +from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager from qiskit.qasm3 import dumps from qiskit import QuantumCircuit from qiskit.circuit import Parameter -from qiskit import transpile, assemble, qasm3 -from qiskit.converters import circuit_to_dag, dag_to_circuit -from qiskit.quantum_info import Statevector +from qiskit import transpile service = QiskitRuntimeService(channel='ibm_quantum') +backend = service.backend("your selected backend") + +pm = generate_preset_pass_manager(backend=backend, optimization_level=1) theta = Parameter('theta') phi = Parameter('phi') From 554108fe5aa580e51301637372875be1f5eecbda Mon Sep 17 00:00:00 2001 From: Rebecca Dimock <66339736+beckykd@users.noreply.github.com> Date: Fri, 27 Sep 2024 14:12:59 -0500 Subject: [PATCH 3/9] Apply suggestions from code review Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> --- docs/guides/primitives-rest-api.mdx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/guides/primitives-rest-api.mdx b/docs/guides/primitives-rest-api.mdx index 85656954af..af752a3af4 100644 --- a/docs/guides/primitives-rest-api.mdx +++ b/docs/guides/primitives-rest-api.mdx @@ -484,7 +484,7 @@ else: ### 1. Initialize the account -Because Qiskit Runtime Sampler is a managed service, you first need to initialize your account. You can then select the device you want to use to run your calculations on. +Because Qiskit Runtime is a managed service, you first need to initialize your account. You can then select the device you want to use to run your calculations on. Find details on how to initialize your account, view available backends, and invalidate tokens in this [topic](./setup-channel#set-up-to-use-ibm-quantum-platform-with-rest-api). @@ -493,17 +493,15 @@ Find details on how to initialize your account, view available backends, and inv ```python import requests import qiskit_ibm_runtime -# Imports from Qiskit Runtime from qiskit_ibm_runtime import QiskitRuntimeService from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager - from qiskit.qasm3 import dumps from qiskit import QuantumCircuit from qiskit.circuit import Parameter from qiskit import transpile service = QiskitRuntimeService(channel='ibm_quantum') -backend = service.backend("your selected backend") +backend = service.backend("") pm = generate_preset_pass_manager(backend=backend, optimization_level=1) @@ -528,7 +526,7 @@ qc.measure_all() qc.draw('mpl') # Get an ISA circuit -isa_circuit= pm.run(qc) +isa_circuit = pm.run(qc) ``` ### 4. Generate QASM 3 code @@ -592,6 +590,7 @@ Next, pass the `job_id` to the API: response_status_singlejob= requests.get(url+'/'+job_id, headers=headers) response_status_singlejob.json().get('state') ``` + Output ```text @@ -599,6 +598,7 @@ Output ``` Get job results: + ```python response_result= requests.get(url+'/'+job_id+'/results', headers=headers) @@ -609,7 +609,9 @@ counts=res_dict['results'][0]['data']['c']['samples'] print(counts[:20]) ``` + Output + ```text ['0x1', '0x2', '0x1', '0x2', '0x1', '0x2', '0x0', '0x2', '0x1', '0x1', '0x2', '0x2', '0x1', '0x1', '0x1', '0x1', '0x1', '0x1', '0x1', '0x1'] ``` From 0291e75da05877a7a2224b13ffdd703ce4a5f97a Mon Sep 17 00:00:00 2001 From: Rebecca Dimock Date: Fri, 27 Sep 2024 14:21:25 -0500 Subject: [PATCH 4/9] Edits from Eric --- docs/guides/primitive-input-output.ipynb | 1 + docs/guides/primitives-rest-api.mdx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guides/primitive-input-output.ipynb b/docs/guides/primitive-input-output.ipynb index c5432fd2c8..ae0f52e3af 100644 --- a/docs/guides/primitive-input-output.ipynb +++ b/docs/guides/primitive-input-output.ipynb @@ -15,6 +15,7 @@ "id": "04b9204f-f058-433b-89f9-05df14645e27", "metadata": {}, "source": [ + "\n", "## Overview of PUBs\n", "\n", "When invoking a primitive's [`run()`](../api/qiskit-ibm-runtime/qiskit_ibm_runtime.EstimatorV2#run) method, the main argument that is required is a `list` of one or more tuples -- one for each circuit being executed by the primitive. Each of these tuples is considered a PUB, and the required elements of each tuple in the list depends on the the primitive used. The data provided to these tuples can also be arranged in a variety of shapes to provide flexibility in a workload through broadcasting -- the rules of which are described in a [following section](#broadcasting-rules).\n", diff --git a/docs/guides/primitives-rest-api.mdx b/docs/guides/primitives-rest-api.mdx index af752a3af4..0520b94623 100644 --- a/docs/guides/primitives-rest-api.mdx +++ b/docs/guides/primitives-rest-api.mdx @@ -541,7 +541,7 @@ print(qasm_str) - The jobs below use [Qiskit Runtime V2 primitives](/migration-guides/v2-primitives). Both `SamplerV2` and `EstimatorV2` take one or more primitive unified blocs (PUBs) as the input. Each PUB is a tuple that contains one circuit and the data broadcasted to that circuit, which can be multiple observables and parameters. Each PUB returns a result. + The jobs below use Qiskit Runtime V2 [primitives](/guides/primitives). Both [`SamplerV2`](/api/qiskit-ibm-runtime/qiskit_ibm_runtime.SamplerV2) and [`EstimatorV2`](/api/qiskit-ibm-runtime/qiskit_ibm_runtime.EstimatorV2) take one or more [primitive unified blocs (PUBs)](/guides/primitive-input-output#pub-overview) as the input. Each PUB is a tuple that contains one circuit and the data broadcasted to that circuit, which can be multiple observables and parameters. Each PUB returns a result. @@ -625,4 +625,5 @@ Output - Read [Migrate to V2 primitives](/migration-guides/v2-primitives). - Practice with primitives by working through the [Cost function lesson](https://learning.quantum.ibm.com/course/variational-algorithm-design/cost-functions#primitives) in IBM Quantum Learning. - Learn how to transpile locally in the [Transpile](./transpile) section. + - [Migrate to the Qiskit Runtime V2 primitives.](/migration-guides/v2-primitives) \ No newline at end of file From 5799bf4ac1c96944d8f599ea646265bce192e5d3 Mon Sep 17 00:00:00 2001 From: Rebecca Dimock <66339736+beckykd@users.noreply.github.com> Date: Mon, 30 Sep 2024 09:49:31 -0500 Subject: [PATCH 5/9] Apply suggestions from code review Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> --- docs/guides/primitives-rest-api.mdx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/guides/primitives-rest-api.mdx b/docs/guides/primitives-rest-api.mdx index 0520b94623..77695bdfe7 100644 --- a/docs/guides/primitives-rest-api.mdx +++ b/docs/guides/primitives-rest-api.mdx @@ -553,7 +553,8 @@ headers = { 'Content-Type': 'application/json', '"Authorization": f"Bearer xxxxxxx", 'x-qx-client-application': 'qiskit-version-2/0.39.2/'+'your_application' # specifying the application you might be running from. For an actual Integration project, this option is invaluable to know where jobs are coming from. At this time the "qiskit-version-2/0.39.2/" string is a necessary prefix. - } +} + job_input = { 'program_id': 'sampler', "backend": backend, @@ -572,7 +573,7 @@ response = requests.post(url, headers=headers, json=job_input) if response.status_code == 200: job_id = response.json().get('id') - print("Job created:",response.text) + print(f"Job created: {response.text}") else: print(f"Error: {response.status_code}") ``` @@ -587,7 +588,7 @@ print(response.text) Next, pass the `job_id` to the API: ```python -response_status_singlejob= requests.get(url+'/'+job_id, headers=headers) +response_status_singlejob = requests.get(f"{url}/{job_id}", headers=headers) response_status_singlejob.json().get('state') ``` @@ -600,7 +601,7 @@ Output Get job results: ```python -response_result= requests.get(url+'/'+job_id+'/results', headers=headers) +response_result = requests.get(f"{url}/{job_id}/results", headers=headers) res_dict=response_result.json() From d3c03d62613222a268050ec8fba218470c1f5c39 Mon Sep 17 00:00:00 2001 From: Rebecca Dimock Date: Mon, 30 Sep 2024 15:46:47 -0500 Subject: [PATCH 6/9] update client-application statement --- docs/guides/primitives-rest-api.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/primitives-rest-api.mdx b/docs/guides/primitives-rest-api.mdx index 77695bdfe7..df5eece059 100644 --- a/docs/guides/primitives-rest-api.mdx +++ b/docs/guides/primitives-rest-api.mdx @@ -552,7 +552,7 @@ url = 'https://api.quantum-computing.ibm.com/runtime/jobs' headers = { 'Content-Type': 'application/json', '"Authorization": f"Bearer xxxxxxx", - 'x-qx-client-application': 'qiskit-version-2/0.39.2/'+'your_application' # specifying the application you might be running from. For an actual Integration project, this option is invaluable to know where jobs are coming from. At this time the "qiskit-version-2/0.39.2/" string is a necessary prefix. + 'x-qx-client-application': 'qiskit-version-2//'+'' # This is set by the client making the request. You can use it to include information such as the package version used. For an integration project, this option is helpful in understanding where jobs are coming from. The prefix 'qiskit-version-2//' is required. } job_input = { From cac8c2274a19d5ec23a4536023637f13c27a32be Mon Sep 17 00:00:00 2001 From: Rebecca Dimock Date: Thu, 3 Oct 2024 10:54:16 -0500 Subject: [PATCH 7/9] Eric edits --- docs/guides/primitives-rest-api.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guides/primitives-rest-api.mdx b/docs/guides/primitives-rest-api.mdx index df5eece059..071480516e 100644 --- a/docs/guides/primitives-rest-api.mdx +++ b/docs/guides/primitives-rest-api.mdx @@ -58,7 +58,9 @@ url = 'https://api.quantum-computing.ibm.com/runtime/jobs' headers = { 'Content-Type': 'application/json', 'x-access-token':auth_id, - 'x-qx-client-application': 'qiskit-version-2/0.39.2/'+'your_application' # specifying the application you might be running from. For an actual Integration project, this option is invaluable to know where jobs are coming from. At this time the "qiskit-version-2/0.39.2/" string is a necessary prefix. + # Replace with the name of your application. This is useful to understand + # where jobs are coming from. Note that the prefix "qiskit-version-2/0.39.2/" is necessary. + 'x-qx-client-application': f'qiskit-version-2/0.39.2/', } job_input = { 'program_id': 'estimator', From ffd9835bc3f2f575274b9e6a2eb402558f2a335b Mon Sep 17 00:00:00 2001 From: Rebecca Dimock <66339736+beckykd@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:29:31 -0500 Subject: [PATCH 8/9] Update docs/guides/primitives-rest-api.mdx Co-authored-by: abbycross --- docs/guides/primitives-rest-api.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/primitives-rest-api.mdx b/docs/guides/primitives-rest-api.mdx index 071480516e..a723f44252 100644 --- a/docs/guides/primitives-rest-api.mdx +++ b/docs/guides/primitives-rest-api.mdx @@ -543,7 +543,7 @@ print(qasm_str) - The jobs below use Qiskit Runtime V2 [primitives](/guides/primitives). Both [`SamplerV2`](/api/qiskit-ibm-runtime/qiskit_ibm_runtime.SamplerV2) and [`EstimatorV2`](/api/qiskit-ibm-runtime/qiskit_ibm_runtime.EstimatorV2) take one or more [primitive unified blocs (PUBs)](/guides/primitive-input-output#pub-overview) as the input. Each PUB is a tuple that contains one circuit and the data broadcasted to that circuit, which can be multiple observables and parameters. Each PUB returns a result. + The following jobs use Qiskit Runtime V2 [primitives](/guides/primitives). Both [`SamplerV2`](/api/qiskit-ibm-runtime/qiskit_ibm_runtime.SamplerV2) and [`EstimatorV2`](/api/qiskit-ibm-runtime/qiskit_ibm_runtime.EstimatorV2) take one or more [primitive unified blocs (PUBs)](/guides/primitive-input-output#pub-overview) as the input. Each PUB is a tuple that contains one circuit and the data broadcasted to that circuit, which can be multiple observables and parameters. Each PUB returns a result. From 6f6b25b1bf690e8bb7161e8563bd9112981bc619 Mon Sep 17 00:00:00 2001 From: Rebecca Dimock Date: Fri, 4 Oct 2024 13:25:35 -0500 Subject: [PATCH 9/9] Change client-application code and comment --- docs/guides/primitives-rest-api.mdx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/guides/primitives-rest-api.mdx b/docs/guides/primitives-rest-api.mdx index a723f44252..06cccbb33f 100644 --- a/docs/guides/primitives-rest-api.mdx +++ b/docs/guides/primitives-rest-api.mdx @@ -58,9 +58,8 @@ url = 'https://api.quantum-computing.ibm.com/runtime/jobs' headers = { 'Content-Type': 'application/json', 'x-access-token':auth_id, - # Replace with the name of your application. This is useful to understand - # where jobs are coming from. Note that the prefix "qiskit-version-2/0.39.2/" is necessary. - 'x-qx-client-application': f'qiskit-version-2/0.39.2/', + # The following is useful to help you understand where jobs are coming from. + 'x-qx-client-application': f'//', } job_input = { 'program_id': 'estimator',