I believe that will work. Or use
-A == hermitian_semidefinite(N)
Note that as I guessed might be the case in your other question, you want to constrain a matrix to be negative semidefinite. That is not the same as constraining a matrix to not be positive semidefinite. They are not equivalent because the latter includes the possibility of the matrix being indefinite.