quantum_launcher.base.base#
Summary#
Classes:
Abstract class for Algorithms. |
|
Abstract class representing a backend for quantum computing. |
|
Abstract class for defining Problems. |
|
Result(best_bitstring: str, best_energy: float, most_common_bitstring: str, most_common_bitstring_energy: float, distribution: dict, energies: dict, num_of_samples: int, average_energy: float, energy_std: float, result: Any) |
Reference#
- class quantum_launcher.base.base.Result(best_bitstring: str, best_energy: float, most_common_bitstring: str, most_common_bitstring_energy: float, distribution: dict, energies: dict, num_of_samples: int, average_energy: float, energy_std: float, result: Any)[source]#
Bases:
object
- best_bitstring: str#
- best_energy: float#
- most_common_bitstring: str#
- most_common_bitstring_energy: float#
- distribution: dict#
- energies: dict#
- num_of_samples: int#
- average_energy: float#
- energy_std: float#
- result: Any#
- class quantum_launcher.base.base.Backend(name: str, parameters: list | None = None)[source]#
Bases:
object
Abstract class representing a backend for quantum computing.
- name#
The name of the backend.
- Type:
str
- path#
The path to the backend (optional).
- Type:
str | None
- parameters#
A list of parameters for the backend (optional).
- Type:
list
- class quantum_launcher.base.base.Problem(instance: Any, instance_name: str = 'unnamed')[source]#
Bases:
ABC
Abstract class for defining Problems.
- variant#
The variant of the problem. The default variant is “Optimization”.
- Type:
str
- path#
The path to the problem.
- Type:
str | None
- name#
The name of the problem.
- Type:
str
- instance_name#
The name of the instance.
- Type:
str
- instance#
An instance of the problem.
- Type:
any
- class quantum_launcher.base.base.Algorithm(**alg_kwargs)[source]#
Bases:
ABC
Abstract class for Algorithms.
- name#
The name of the algorithm, derived from the class name in lowercase.
- Type:
str
- path#
The path to the algorithm, if applicable.
- Type:
str | None
- parameters#
A list of parameters for the algorithm.
- Type:
list
- alg_kwargs#
Additional keyword arguments for the algorithm.
- Type:
dict
- Abstract methods:
__init__(self, **alg_kwargs): Initializes the Algorithm object. _get_path(self) -> str: Returns the common path for the algorithm. run(self, problem: Problem, backend: Backend): Runs the algorithm on a specific problem using a backend.