qunicorn_core.core.pilotmanager package

Submodules

qunicorn_core.core.pilotmanager.aws_pilot module

class qunicorn_core.core.pilotmanager.aws_pilot.AWSPilot

Bases: Pilot

The AWS Pilot

cancel_provider_specific(job_dto)

Cancel execution of a job at the corresponding backend

execute_provider_specific(job_core_dto: JobCoreDto)

Execute a job of a provider specific type on a backend using a Pilot

get_standard_job_with_deployment(user_id: str | None, device: DeviceDataclass) JobDataclass

Get the standard job including its deployment for a certain user and device

get_standard_provider()

Create the standard ProviderDataclass Object for the pilot and return it

is_device_available(device: DeviceDto, token: str) bool

Check if a device is available for a user

provider_name: ProviderName = 'AWS'
run(job_core_dto: JobCoreDto) list[ResultDataclass]

Execute the job on a local simulator and saves results in the database

save_devices_from_provider(device_request)

Save the available aws device into the database. Since there is currently only a local simulator in use, the device_request parameter is unused.

supported_languages: list[AssemblerLanguage] = [AssemblerLanguage.BRAKET, AssemblerLanguage.QASM3]

qunicorn_core.core.pilotmanager.base_pilot module

class qunicorn_core.core.pilotmanager.base_pilot.Pilot

Bases: object

Base class for Pilots

cancel(job: JobCoreDto)

Cancel the execution of a job, locally or if that is not possible at the backend

cancel_provider_specific(job)

Cancel execution of a job at the corresponding backend

execute(job_core_dto: JobCoreDto) list[ResultDataclass]

Execute a job on a backend using a Pilot

execute_provider_specific(job_core_dto: JobCoreDto) list[ResultDataclass]

Execute a job of a provider specific type on a backend using a Pilot

get_device_data_from_provider(device: DeviceDto, token: str) dict

Get device data for a specific device from the provider

get_standard_devices() -> (list[qunicorn_core.db.models.device.DeviceDataclass], <class 'qunicorn_core.db.models.device.DeviceDataclass'>)

Get all devices from the provider

get_standard_job_with_deployment(user_id: str | None, device: DeviceDataclass) JobDataclass

Create the standard ProviderDataclass Object for the pilot and return it

get_standard_provider() ProviderDataclass

Create the standard ProviderDataclass Object for the pilot and return it

has_same_provider(provider_name: ProviderName) bool

Check if the provider name is the same as the pilot provider name

is_device_available(device: DeviceDto, token: str) bool

Check if a device is available for a user

provider_name: ProviderName
static qubit_binary_to_hex(qubits_in_binary: dict, job_id: int) dict

To make sure that the qubits in the counts or probabilities are in hex format and not in binary format

static qubits_decimal_to_hex(qubits_in_binary: dict, job_id: int) dict

To make sure that the qubits in the counts or probabilities are in hex format and not in decimal format

run(job: JobCoreDto) list[ResultDataclass]

Run a job of type RUNNER on a backend using a Pilot

save_devices_from_provider(device_request: DeviceRequestDto)

Create the standard ProviderDataclass Object for the pilot and return it

supported_languages: list[AssemblerLanguage]

qunicorn_core.core.pilotmanager.ibm_pilot module

class qunicorn_core.core.pilotmanager.ibm_pilot.IBMPilot

Bases: Pilot

The IBM Pilot

static calculate_probabilities(counts: dict) dict

Calculates the probabilities from the counts, probability = counts / total_counts

cancel_provider_specific(job_dto: JobCoreDto)

Cancel a job on an IBM backend using the IBM Pilot

execute_provider_specific(job_core_dto: JobCoreDto)

Execute a job of a provider specific type on a backend using a Pilot

get_device_data_from_provider(device: DeviceDto, token: str) dict

Get device data for a specific device from the provider

static get_ibm_provider_and_login(token: str) IBMProvider

Save account credentials and get provider

get_standard_job_with_deployment(user_id: str | None, device: DeviceDataclass) JobDataclass

Create the standard ProviderDataclass Object for the pilot and return it

get_standard_provider()

Create the standard ProviderDataclass Object for the pilot and return it

is_device_available(device: DeviceDto, token: str) bool

Check if a device is available for a user

provider_name: ProviderName = 'IBM'
run(job_dto: JobCoreDto) list[ResultDataclass]

Execute a job local using aer simulator or a real backend

save_devices_from_provider(device_request)

Create the standard ProviderDataclass Object for the pilot and return it

supported_languages: list[AssemblerLanguage] = [AssemblerLanguage.QISKIT]

qunicorn_core.core.pilotmanager.pilot_manager module

qunicorn_core.core.pilotmanager.pilot_manager.PILOTS: list[Pilot] = [<qunicorn_core.core.pilotmanager.ibm_pilot.IBMPilot object>, <qunicorn_core.core.pilotmanager.aws_pilot.AWSPilot object>]

“This Class is responsible for managing the pilots and their data, all pilots are saved in the PILOTS list

qunicorn_core.core.pilotmanager.pilot_manager.check_if_device_available_from_provider(device, token) bool
qunicorn_core.core.pilotmanager.pilot_manager.get_device_data_from_provider(device, token) dict
qunicorn_core.core.pilotmanager.pilot_manager.save_default_jobs_and_devices_from_provider()

Get all default data from the pilots and save them to the database

qunicorn_core.core.pilotmanager.pilot_manager.update_and_get_devices_from_provider(device_request: DeviceRequestDto) list[SimpleDeviceDto]

Update the devices from the provider and return all devices from the database

Module contents