Which is worse: state prison or a secure mental institution?

Thankfully I’ve never been to either, but I know people who were in both, my ex was actually in both and from what she said I’d say the mental institution is worse. (She used to cry and tell me that she wanted to come home).