Nearest complex positive semidefinite matrix

There seem to be a lot of work on finding the nearest positive semidefinite matrix to a real symmetric matrix, but other than via an eigendecomposition, which is slow (as below), does anyone know of a way to find the nearest PSD matrix to a complex Hermitian matrix?

function project_psd(H)
    # take the eigendecomposition, set any negative
    # eigenvalues to 0, and reconstruct
    D,V = eigen(Hermitian(H))
    D .= max.(D,0)
    return Hermitian(V*Diagonal(D)*V')

Try formulating your problem as a conic program and use a conic solver, e.g. GitHub - mariohsouto/ProxSDP.jl: Semidefinite programming optimization solver. Also if you ask in the optimization category, you may find more helpful comments from the SDP folks there.

1 Like

I don’t know much about this type of problems, but often methods that work or symmetric matrices work for hermitian as well, by changing transposes to adjoints and adding a few real().

1 Like