qunicorn_core.core.pilotmanager package
Submodules
qunicorn_core.core.pilotmanager.aws_pilot module
- class qunicorn_core.core.pilotmanager.aws_pilot.AWSPilot
Bases:
PilotThe 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(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
- 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)
Access the devices from the cloud service of the provider, to update the current device list of qunicorn
qunicorn_core.core.pilotmanager.base_pilot module
- class qunicorn_core.core.pilotmanager.base_pilot.Pilot
Bases:
objectBase class for Pilots
- static calculate_probabilities(counts: dict) dict
Calculates the probabilities from the counts, probability = counts / total_counts
- 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
- create_default_job_with_circuit_and_device(device: DeviceDataclass, circuit: str) JobDataclass
Method to create a default job for a pilot with one given circuit and device. This method always takes the first supported Language of the pilot and assigns it to the program. The Deployment and Job Name will be generated from the ProviderName and SupportedLanguage of the Pilot.
- 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(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
- 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)
Access the devices from the cloud service of the provider, to update the current device list of qunicorn
qunicorn_core.core.pilotmanager.ibm_pilot module
- class qunicorn_core.core.pilotmanager.ibm_pilot.IBMPilot
Bases:
PilotThe IBM Pilot
- cancel_provider_specific(job_dto: JobCoreDto)
Cancel a job on an IBM backend using the IBM Pilot
- static check_if_env_variable_true_for_experimental(job_core_dto)
EXPERIMENTAL
- 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(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
- 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)
Access the devices from the cloud service of the provider, to update the current device list of qunicorn
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>, <qunicorn_core.core.pilotmanager.rigetti_pilot.RigettiPilot 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.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