Hello Herm,
By positive, do you mean positive semidefinite? You say both A and B are positive; do you mean the same thing for both?
The sparsity of A is not fixed. That seems difficult to handle. You will need a special rule to decide when a zero entry is allowed to become nonzero, and likewise you will have to decide when to set a nonzero entry to zero.
I'm not sure this problem is phrased in its most useful way. For example, assuming you meant positive semidefinite, then the solution to min trace(AB) is simply A = B = 0. For maximization, the problem is unbounded. So I imagine there is something else in the constraints or the cost?
Best,
Nicolas