Source code for quantum_launcher.problems.problem_initialization.raw
1""" This module contains the Raw class."""
2from quantum_launcher.base import Problem, formatter
3
4
[docs]
5class Raw(Problem):
6 """
7 Class for solving problem implemented in raw mathematical form.
8
9 "Raw mathematical form" means that the problem is defined in format
10 that can be directly read by the quantum algorithm, such as Qubo, Hamiltonian, etc.
11
12 The object contains an instance of the problem written in mentioned raw mathematical form,
13 can be passed into Quantum Launcher.
14
15 Attributes:
16 instance (any): Formulated problem instance.
17 """
18
19 def __init__(self, instance: any = None, instance_name: str | None = None) -> None:
20 super().__init__(instance=instance, instance_name=instance_name)
21
22 def _get_path(self) -> str:
23 return f'{self.name}/{self.instance_name}'