QuantumInterface

class selene_core.quantum_interface.QuantumInterface

An abstract base class for quantum interfaces.

This class provides a blueprint for implementing quantum interfaces that interact with various quantum hardware or simulators. It ensures that all derived classes implement the necessary methods to retrieve the path to the shared object file and any additional library paths required.

__abstractmethods__ = frozenset({'library_file'})
__eq__(other)

Return self==value.

__hash__ = None
__init__() None
__repr__()

Return repr(self).

abstract property library_file: Path

Returns the path to the object file for the quantum interface. It may be a shared object, static object, or any other file type. The [build planner](/selene-sim/python/selene_sim/builder/build_planner.py) should be provided the information on how to use this file to map a user program to the selene interface.

property library_search_dirs: list[Path]

Returns a list of additional library paths required by this interface. These paths will be provided in the environment when the emulator is run, through PATH on Windows, LD_LIBRARY_PATH on Linux, or DYLD_LIBRARY_PATH on MacOS.

Returns the flags to be used when linking the interface against the selene executable, if any.

register_build_steps(planner: BuildPlanner)

Registers the build steps for this interface with the provided [build planner](/selene-sim/python/selene_sim/builder/build_planner.py). This method should be overridden by subclasses to add specific build steps.