qiskit_quantuminspire package

Subpackages

Submodules

qiskit_quantuminspire.base_provider module

class qiskit_quantuminspire.base_provider.BaseProvider[source]

Bases: ABC

Base class for a provider.

abstract backends() Sequence[BackendV2][source]

Return all backends for this provider.

abstract get_backend(name: str | None = None, id: int | None = None) BackendV2[source]

Get a backend by name.

qiskit_quantuminspire.cqasm module

qiskit_quantuminspire.cqasm.dumps(circuit: QuantumCircuit) str[source]

Return the cQASM representation of the circuit.

qiskit_quantuminspire.qi_backend module

class qiskit_quantuminspire.qi_backend.QIBackend(backend_type: BackendType, **kwargs: Any)[source]

Bases: BackendV2

A wrapper class for QuantumInspire backendtypes to integrate with Qiskit’s Backend interface.

property id: int
property max_circuits: int | None

The maximum number of circuits (or Pulse schedules) that can be run in a single job.

If there is no limit this will return None

property max_shots: int
run(run_input: QuantumCircuit | List[QuantumCircuit], **options: Any) QIJob[source]

Create and run a (batch)job on an QuantumInspire Backend.

Parameters:

run_input – A single or list of Qiskit QuantumCircuit objects or hybrid algorithms.

Returns:

A reference to the batch job that was submitted.

Return type:

QIJob

property target: Target

A qiskit.transpiler.Target object for the backend.

Return type:

Target

qiskit_quantuminspire.qi_jobs module

class qiskit_quantuminspire.qi_jobs.CircuitExecutionData(circuit: QuantumCircuit, job_id: int | None = None, results: Result | None = None)[source]

Bases: object

Class for book-keeping of individual jobs.

circuit: QuantumCircuit
job_id: int | None = None
results: Result | None = None
class qiskit_quantuminspire.qi_jobs.QIJob(run_input: QuantumCircuit | List[QuantumCircuit], backend: BackendV2 | None, **kwargs: Any)[source]

Bases: JobV1

A wrapper class for QuantumInspire batch jobs to integrate with Qiskit’s Job interface.

classmethod deserialize(provider: BaseProvider, file_path: str | Path) QIJob[source]

Recover a prior job from a file written by QIJob.serialize().

Parameters:
  • provider – Used to get the backend on which the original job ran.

  • file_path – The path to the file where the job information is stored.

result(wait_for_results: bool | None = True, timeout: float = 60.0) Result[source]

Return the results of the job.

serialize(file_path: str | Path) None[source]

Serialize job information in this class to a file.

Uses Qiskit serialization to write circuits to a .qpy file, and includes backend and and batch_job information in the metadata so that we can recover the associated data later.

Parameters:

file_path – The path to the file where the job information will be stored.

status() JobStatus[source]

Return the status of the (batch)job, among the values of JobStatus.

submit() None[source]

Submit the job to the backend for execution.

qiskit_quantuminspire.qi_provider module

class qiskit_quantuminspire.qi_provider.QIProvider[source]

Bases: BaseProvider

List QIBackends integrated with QiskitBackend interface.

backends() Sequence[QIBackend][source]

Return all backends for this provider.

get_backend(name: str | None = None, id: int | None = None) QIBackend[source]

Get a backend by name.

qiskit_quantuminspire.utils module

qiskit_quantuminspire.utils.is_coupling_map_complete(coupling_map: CouplingMap) bool[source]

A complete digraph is a digraph in which there is a directed edge from every vertex to every other vertex.

qiskit_quantuminspire.utils.run_async(async_function: Coroutine[Any, Any, Any]) Any[source]

Module contents