qiskit_superstaq.superstaq_job ============================== .. py:module:: qiskit_superstaq.superstaq_job Classes ------- .. autoapisummary:: qiskit_superstaq.superstaq_job.SuperstaqJob Module Contents --------------- .. py:class:: SuperstaqJob(backend: qiskit_superstaq.SuperstaqBackend, job_id: str) Bases: :py:obj:`qiskit.providers.JobV1` This class represents a Superstaq job instance. .. py:method:: cancel(index: int | None = None, **kwargs: object) -> None Cancel the current job if it is not in a terminal state. :param index: An optional index of the specific sub-job to cancel. :param kwargs: Extra options needed to fetch jobs. :raises ~general_superstaq.SuperstaqServerException: If unable to get the status of the job from the API or cancellations were unsuccessful. .. py:method:: compiled_circuits(index: int) -> qiskit.QuantumCircuit compiled_circuits(index: None = None) -> list[qiskit.QuantumCircuit] Gets the compiled circuits that were processed for this job. :param index: An optional index of the specific circuit to retrieve. :returns: A single compiled circuit or list of compiled circuits. .. py:method:: input_circuits(index: int) -> qiskit.QuantumCircuit input_circuits(index: None = None) -> list[qiskit.QuantumCircuit] Gets the original circuits that were submitted for this job. :param index: An optional index of the specific circuit to retrieve. :returns: The input circuit or list of submitted input circuits. .. py:method:: pulse_gate_circuits(index: int) -> qiskit.QuantumCircuit pulse_gate_circuits(index: None = None) -> list[qiskit.QuantumCircuit] Gets the pulse gate circuit(s) returned by this job. :param index: An optional index of the pulse gate circuit to retrieve. :returns: A single pulse gate circuit or list of pulse gate circuits. .. py:method:: result(index: int | None = None, timeout: float | None = None, wait: float = 5, qubit_indices: collections.abc.Sequence[int] | None = None) -> qiskit.result.Result Retrieves the result data associated with a Superstaq job. :param index: An optional index to retrieve a specific result from a result list. :param timeout: An optional parameter that fixes when result retrieval times out. Units are in seconds. :param wait: An optional parameter that sets the interval to check for Superstaq job results. Units are in seconds. Defaults to 5. :param qubit_indices: The qubit indices to return the results of individually. :returns: A qiskit result object containing job information. .. py:method:: status(index: int | None = None) -> qiskit.providers.jobstatus.JobStatus Query for the equivalent qiskit job status. :param index: An optional index to retreive a specific job status. :returns: The equivalent `qiskit.providers.jobstatus.JobStatus` type. .. py:method:: submit() -> None :abstractmethod: Unsupported submission call. :raises NotImplementedError: If a job is submitted via `SuperstaqJob`. .. py:method:: to_dict() -> dict[str, general_superstaq.typing.Job] Refreshes and returns job information. .. note:: The contents of this dictionary are not guaranteed to be consistent over time. Whenever possible, users should use the specific `SuperstaqJob` methods to retrieve the desired job information instead of relying on particular entries in the output of this method. :returns: A dictionary containing updated job information. .. py:attribute:: ALL_STATES :value: ('Done', 'Cancelled', 'Failed', 'Queued', 'Submitted', 'Running') .. py:attribute:: PROCESSING_STATES :value: ('Queued', 'Submitted', 'Running') .. py:attribute:: TERMINAL_STATES :value: ('Done', 'Cancelled', 'Failed')