--- Final Solver (used for performance test) ---
import numpy as np
import scipy.linalg
from scipy.linalg._matfuncs_schur_sqrtm import recursive_schur_sqrtm
from typing import Any

class Solver:
    def __init__(self):
        pass
    
    def solve(self, problem, **kwargs) -> Any:
        A = problem["matrix"]
        
        # Use recursive_schur_sqrtm directly for less overhead
        try:
            X = recursive_schur_sqrtm(A)[0]
        except Exception as e:
            print(f"sqrtm failed: {e}")
            return {"sqrtm": {"X": []}}
        
        solution = {"sqrtm": {"X": X.tolist()}}
        return solution
--- End Solver ---
Running performance test...
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.0.2, pluggy-1.6.0
rootdir: /tests
plugins: anyio-4.13.0, jaxtyping-0.3.9
collected 3 items

../tests/test_outputs.py .
--- Performance Summary ---
Validity: True
Total Baseline Time: 51.4374s
Total Solver Time:   24.9197s
Raw Speedup:         2.0641 x
Final Reward (Score): 2.0641
---------------------------
..

=============================== warnings summary ===============================
test_outputs.py: 1100 warnings
  /tests/evaluator.py:79: DeprecationWarning: The `disp` argument is deprecated and will be removed in SciPy 1.18.0.
    X, _ = scipy.linalg.sqrtm(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
==================================== PASSES ====================================
=========================== short test summary info ============================
PASSED ../tests/test_outputs.py::test_solver_exists
PASSED ../tests/test_outputs.py::test_solver_validity
PASSED ../tests/test_outputs.py::test_solver_speedup
================ 3 passed, 1100 warnings in 1087.49s (0:18:07) =================
