How do I restrict a matrix variable to be both Positive Semidefinite and Hermitian in CVXR? When I try to add both attributes, I get an error saying that I can only have one attribute.
Here is what I tried:
theta <- Variable(rows = 3, cols = 3, PSD = TRUE, hermitian = TRUE)
Here is the error:
Error in .local(.Object, ...) :
Cannot set more than one special attribute.
This will create a matrix variable theta that is both positive semidefinite and Hermitian. CVXR will enforce both of these constraints automatically when the variable is marked as PSD.