Tfocs: quadratic minimization with matrix variables

Hello,

I am trying to minimize the following functional using \text{tfocs}: \text{argmin}_X \|BX-Y\|_F^2 + R(X) and I have hard time implementing the smooth part. I have tried \text{smooth_quad} (with no arguments) with affine form \{B, -Y\} and it seems that \text{smooth_quad} does not accept matrix variables. Then I wrote a simple function implementing f(X) = \frac{1}{2}\|X\|_F^2 and its gradient and used it as my smooth function and it did not do the trick. Finally, I eliminated the use of affine form and implemented f(X) = \|BX-Y\|_F^2 and its gradient and that did not help either. I might be missing a very trivial point. I would appreciate any suggestions.

Update: The last option, in which I implemented f(X) and its gradient and passed it to tfocs (without the use of an affine form) works. However, I am still wondering what the best practice is in this case.