I am asking this question in response to comments by mikado and Daniel Lichtblau on my question Maximize a six-dimensional function subject to joint positive-semidefiniteness constraints
I gave two matrices there
{{1/3 - a2/2, -((I a1)/2), (I a3)/2}, {(I a1)/2, 1/3 + a2/2, 0}, {-((I a3)/2), 0, 1/3}}
and
{{1/4, 0, b1/2, 0}, {0, 1/4, 1/2 (I b2 - b3), 0},
{b1/2, 1/2 (-I b2 - b3), 1/4, 0}, {0, 0, 0, 1/4}}
Let's call the first $C1$ and the second $C2$. I want to ensure that these two ($3 \times 3$ and $4 \times 4$ "density") matrices are positive-semidefinite.
The code I used for the "principal leading minors" test in order to implement it was
T = Array[1, 3];
Do[T[[k]] = FullSimplify[ComplexExpand[FullSimplify[Det[Take[C1, {1, k}, {1, k}]]]]{k, 1,3}];
constraint1 = T[[1]] >= 0;
Do[constraint1 = constraint1 && T[[i]] >= 0, {i, 2, 3}];
constraint1 = FullSimplify[constraint1]
giving
9 (a1^2 + a2^2) <= 4 && 18 (a1^2 + a2^2) + 9 (2 + 3 a2) a3^2 <= 8
and
T = Array[1, 4];
Do[T[[k]] = FullSimplify[ComplexExpand[FullSimplify[Det[Take[C2, {1, k}, {1, k}]]]]{k, 1,4}];
constraint2 = T[[1]] >= 0;
Do[constraint2 = constraint2 && T[[i]] >= 0, {i, 2, 4}];
constraint2 = FullSimplify[constraint2]
giving
4 (b1^2 + b2^2 + b3^2) <= 1
The question posed in Maximize a six-dimensional function subject to joint positive-semidefiniteness constraints
was to maximize
Abs[a1 b1] + Abs[a2 b2] + Abs[a3 b3]
subject to the intersection
9 (a1^2 + a2^2) <= 4 && 18 (a1^2 + a2^2) + 9 (2 + 3 a2) a3^2 <= 8 && 4 (b1^2 + b2^2 + b3^2) <= 1
of the two constraints.
All kosher?
(Note: In the indicated prior question, $C2$ had a "typo" of 01/2--as pointed out by mikado--rather than 1/2--I guess due to my unartful cutting-and-pasting.)
Incidentally, "density matrices" are "self-adjoint (or Hermitian), positive semi-definite, of trace one".
LDLH[]from your matrix, I get{3 a2 <= 2, 2 + 3 a2 + (9 a1^2)/(-2 + 3 a2) >= 0, 2 + (9 (2 + 3 a2) a3^2)/(-4 + 9 a1^2 + 9 a2^2) >= 0}Look at the form of the last entry. Ifa3 = 0, then the last entry becomes2, which is indeed nonnegative. However, the denominator also becomes 0 for those values ofa1anda2. Thus, you will need to be careful in taking these conditions apart. As an example:CylindricalDecomposition[And @@ Thread[FullSimplify[ComplexExpand[Last[LDLH[m1]]]] >= 0], {a3, a2, a1}]– J. M.'s missing motivation Feb 02 '20 at 17:19