qunicorn_core.db.models.quantum_program module

class qunicorn_core.db.models.quantum_program.QuantumProgramDataclass(quantum_circuit, assembler_language, deployment=None, translations=<factory>, python_file_path=None, python_file_metadata=None, python_file_options=None, python_file_inputs=None)

Bases: DbModel

Dataclass for storing QuantumPrograms

Attributes:

id (int): The ID of the quantum program. (set by the database) quantum_circuit (str|None): Quantum code that needs to be executed. assembler_language (str|None): Assembler language in which the code should be interpreted. deployment (DeploymentDataclass, optional): The deployment where a list of quantum program is used. python_file_path (str|None): Part of experimental feature: path to file to be uploaded (to IBM). python_file_metadata (str|None): Part of experimental feature: metadata for the python_file. python_file_options (str, optional): Part of experimental feature: options for the python_file. python_file_input (str, optional): Part of experimental feature: inputs for the python_file.

classmethod apply_authentication_filter(query: Select, user_id: str | None) Select
assembler_language: Mapped[str | None]
deployment: Mapped[DeploymentDataclass | None]
deployment_id: Mapped[int | None]
id: Mapped[int]
python_file_inputs: Mapped[str | None]
python_file_metadata: Mapped[str | None]
python_file_options: Mapped[str | None]
python_file_path: Mapped[str | None]
quantum_circuit: Mapped[str | None]
translations: Mapped[list[TranslatedProgramDataclass]]
class qunicorn_core.db.models.quantum_program.TranslatedProgramDataclass(quantum_circuit, is_string, assembler_language, translation_distance, program=None)

Bases: DbModel

Dataclass for storing Translated QuantumPrograms

Attributes:

id (int): The ID of the quantum program. (set by the database) quantum_circuit (bytes|None): Quantum code that needs to be executed. assembler_language (str|None): Assembler language in which the code should be interpreted. translation_distance (int): The distance of this translation from the source. program_id (QuantumProgramDataclass, optional): The QuanrumProgram this translation is based on.

assembler_language: Mapped[str]
property circuit: str | bytes
id: Mapped[int]
is_string: Mapped[bool]
program: Mapped[QuantumProgramDataclass | None]
program_id: Mapped[int | None]
quantum_circuit: Mapped[bytes]
translation_distance: Mapped[int]