# Autogenerated shim – re‑export real implementation from quantum_finance.quantum_ai

"""Backward‑compatibility shim for legacy imports.

Legacy code and unit tests often perform imports such as::

    from quantum_ai.core.measurement_result import QuantumMeasurementResult

After the 2024 refactor the *real* implementation lives under
``quantum_finance.quantum_ai``.  This stub module simply delegates all symbol
look‑ups to the new location so that no changes are required in external code.
"""

import importlib as _importlib
import sys as _sys
from types import ModuleType as _ModuleType

# Import the *real* package (this will raise ImportError if it does not exist).
_real_pkg = _importlib.import_module("quantum_finance.quantum_ai")

# Populate the public namespace with everything that the real package exports.
globals().update(_real_pkg.__dict__)

# Ensure that sub‑modules (e.g. quantum_ai.core) resolve correctly.  We iterate
# over already‑loaded sub‑modules of the real package and expose them under the
# alias as well.
_prefix = _real_pkg.__name__ + "."
for name, mod in _sys.modules.items():
    if name.startswith(_prefix):
        alias_name = name.replace(_prefix, "quantum_ai.")
        _sys.modules[alias_name] = mod  # type: ignore[index]

# Finally register *this* module in sys.modules so that repeated imports use
# the same alias instance.
_sys.modules.setdefault("quantum_ai", _real_pkg) 