Outer product error :Disciplined convex programming error: Invalid quadratic form(s): not a square

clear;clc;
a=randn(3,1)+1i*randn(3,1);
A=a*a';
cvx_begin sdp 
variable phi(3,1) complex
expression B(3,3)
    B=phi*phi';
minimize trace(A*B)
subject to 
[phi*phi',phi;phi',1 ]==hermitian_semidefinite(4);
cvx_end

For the above problem, I found that the outer product (x*x’) is not allowed in CVX. The error is shown as
Disciplined convex programming error: Invalid quadratic form(s): not a square.
What’s the meaning of this error and how can I express outer product in object and constraints?

Using the cyclic permutation invariance of trace, the objective can be rewritten as square_pos(norm(a'*phi)), which can be replaced by norm(a'*phi) because it has the same argmin.

Your semidefintie constraint, as written, is a Bilinear Matrix Inequality (BMI) constraint, which is non-convex and not allowed by CVX.

See my answer to your previous question ERROR:Disciplined convex programming error: Only scalar quadratic forms can be specified in CVX . Did you not learn from that answer?

The link below was also provided in my answer to your previous question. Perhaps you did not read it carefully enough?