132 lines
6.2 KiB
Plaintext
132 lines
6.2 KiB
Plaintext
---
|
||
title: CQCExtractorJob (v0.26)
|
||
description: API reference for qiskit.providers.ibmq.random.CQCExtractorJob in qiskit v0.26
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.providers.ibmq.random.CQCExtractorJob
|
||
---
|
||
|
||
<span id="qiskit-providers-ibmq-random-cqcextractorjob" />
|
||
|
||
# qiskit.providers.ibmq.random.CQCExtractorJob
|
||
|
||
<Class id="qiskit.providers.ibmq.random.CQCExtractorJob" isDedicatedPage={true} github="https://github.com/qiskit/qiskit-ibmq-provider/tree/stable/0.13/qiskit/providers/ibmq/random/cqcextractorjob.py" signature="CQCExtractorJob(job_id, client, parameters=None)" modifiers="class">
|
||
Representation of an asynchronous call to the CQC extractor.
|
||
|
||
An instance of this class is returned when you call [`run_async_ext1()`](qiskit.providers.ibmq.random.CQCExtractor#run_async_ext1 "qiskit.providers.ibmq.random.CQCExtractor.run_async_ext1"), [`run_async_ext2()`](qiskit.providers.ibmq.random.CQCExtractor#run_async_ext2 "qiskit.providers.ibmq.random.CQCExtractor.run_async_ext2"), or [`retrieve_job()`](qiskit.providers.ibmq.random.CQCExtractor#retrieve_job "qiskit.providers.ibmq.random.CQCExtractor.retrieve_job") method of the [`CQCExtractor`](qiskit.providers.ibmq.random.CQCExtractor "qiskit.providers.ibmq.random.CQCExtractor") class.
|
||
|
||
If the job is successfully submitted, you can inspect the job’s status by calling [`status()`](#qiskit.providers.ibmq.random.CQCExtractorJob.status "qiskit.providers.ibmq.random.CQCExtractorJob.status").
|
||
|
||
Some of the methods in this class are blocking, which means control may not be returned immediately. [`block_until_ready()`](#qiskit.providers.ibmq.random.CQCExtractorJob.block_until_ready "qiskit.providers.ibmq.random.CQCExtractorJob.block_until_ready") is an example of a blocking method, which waits until the job completes:
|
||
|
||
```python
|
||
job = extractor.run_async_ext1(...)
|
||
random_bits = job.block_until_ready()
|
||
```
|
||
|
||
<Admonition title="Note" type="note">
|
||
An error may occur when querying the remote server to get job information. The most common errors are temporary network failures and server errors, in which case an `RequestsApiError` is raised. These errors usually clear quickly, so retrying the operation is likely to succeed.
|
||
</Admonition>
|
||
|
||
CQCExtractorJob constructor.
|
||
|
||
**Parameters**
|
||
|
||
* **job\_id** (`str`) – Job ID.
|
||
* **client** (`RandomClient`) – Object for connecting to the server.
|
||
* **parameters** (`Optional`\[`Dict`]) – Parameters used for this job.
|
||
|
||
### \_\_init\_\_
|
||
|
||
<Function id="qiskit.providers.ibmq.random.CQCExtractorJob.__init__" signature="__init__(job_id, client, parameters=None)">
|
||
CQCExtractorJob constructor.
|
||
|
||
**Parameters**
|
||
|
||
* **job\_id** (`str`) – Job ID.
|
||
* **client** (`RandomClient`) – Object for connecting to the server.
|
||
* **parameters** (`Optional`\[`Dict`]) – Parameters used for this job.
|
||
</Function>
|
||
|
||
## Methods
|
||
|
||
| | |
|
||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
|
||
| [`__init__`](#qiskit.providers.ibmq.random.CQCExtractorJob.__init__ "qiskit.providers.ibmq.random.CQCExtractorJob.__init__")(job\_id, client\[, parameters]) | CQCExtractorJob constructor. |
|
||
| [`block_until_ready`](#qiskit.providers.ibmq.random.CQCExtractorJob.block_until_ready "qiskit.providers.ibmq.random.CQCExtractorJob.block_until_ready")(\[timeout, wait]) | Wait for the job to finish and return the result. |
|
||
| [`status`](#qiskit.providers.ibmq.random.CQCExtractorJob.status "qiskit.providers.ibmq.random.CQCExtractorJob.status")() | Query the server for the latest job status. |
|
||
|
||
## Attributes
|
||
|
||
| | |
|
||
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
|
||
| [`extractor_method`](#qiskit.providers.ibmq.random.CQCExtractorJob.extractor_method "qiskit.providers.ibmq.random.CQCExtractorJob.extractor_method") | Return the extractor method used. |
|
||
| [`parameters`](#qiskit.providers.ibmq.random.CQCExtractorJob.parameters "qiskit.providers.ibmq.random.CQCExtractorJob.parameters") | Return the parameters passed to the extractor. |
|
||
|
||
### block\_until\_ready
|
||
|
||
<Function id="qiskit.providers.ibmq.random.CQCExtractorJob.block_until_ready" signature="block_until_ready(timeout=None, wait=10)">
|
||
Wait for the job to finish and return the result.
|
||
|
||
**Parameters**
|
||
|
||
* **timeout** (`Optional`\[`float`]) – Seconds to wait for the job. If `None`, wait indefinitely.
|
||
* **wait** (`float`) – Seconds between queries. Use a larger number if the job is expected to run for a long time.
|
||
|
||
**Return type**
|
||
|
||
`List`\[`int`]
|
||
|
||
**Returns**
|
||
|
||
Extractor output.
|
||
|
||
**Raises**
|
||
|
||
[**JobTimeoutError**](qiskit.providers.JobTimeoutError "qiskit.providers.JobTimeoutError") – If the job does not finish before the specified timeout.
|
||
</Function>
|
||
|
||
### extractor\_method
|
||
|
||
<Attribute id="qiskit.providers.ibmq.random.CQCExtractorJob.extractor_method">
|
||
Return the extractor method used.
|
||
|
||
**Return type**
|
||
|
||
`str`
|
||
|
||
**Returns**
|
||
|
||
Extractor method used.
|
||
</Attribute>
|
||
|
||
### parameters
|
||
|
||
<Attribute id="qiskit.providers.ibmq.random.CQCExtractorJob.parameters">
|
||
Return the parameters passed to the extractor.
|
||
|
||
**Return type**
|
||
|
||
`Dict`
|
||
|
||
**Returns**
|
||
|
||
Parameters passed to the extractor.
|
||
</Attribute>
|
||
|
||
### status
|
||
|
||
<Function id="qiskit.providers.ibmq.random.CQCExtractorJob.status" signature="status()">
|
||
Query the server for the latest job status.
|
||
|
||
**Return type**
|
||
|
||
`JobStatus`
|
||
|
||
**Returns**
|
||
|
||
The status of the job.
|
||
</Function>
|
||
</Class>
|
||
|