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:
DbModelDataclass 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.
- deployment: Mapped[DeploymentDataclass | None]
- translations: Mapped[list[TranslatedProgramDataclass]]
- class qunicorn_core.db.models.quantum_program.TranslatedProgramDataclass(quantum_circuit, is_string, assembler_language, translation_distance, program=None)
Bases:
DbModelDataclass 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.
- program: Mapped[QuantumProgramDataclass | None]