[INPUT_SEPARATOR]
First, create a Cython helper module for distance calculations.
```python
edit
file: solver.py
lines: 0-0
---
import numpy as np
from typing import Any
import numba

@numba.njit(cache=True)
def is_positive_semidefinite(P):
    """Check if matrix P is positive semi-definite using Sylvester's criterion."""
    n = P.shape[0]
    
    # Check all leading principal minors
    for k in range(1, n + 1):
        # Compute determinant of k x k leading principal minor
        det = np.linalg.det(P[:k, :k])
        if det < -1e-10:  # Small tolerance for numerical errors
            return False
    
    return True

class Solver:
    def solve(self, problem, **kwargs) -> Any:
        """Check if the quadratic function is convex."""
        P = np.asarray(problem["P"], dtype=np.float64)
        return is_positive_semidefinite(P)
---
```