I have these constraints on a cost function
$$ c = A+Bx=A+B\text{vec}\ (q^*q^\top), $$ where $(c,A)\in\mathbb{R}^{100}$, $B\in\mathbb{C}^{100\times 81}$, $x\in\mathbb{C}^{81}$ and $q\in\mathbb{C}^9$. So $x=\text{vec}\ (q^*q^\top)$, which is the vectorization operator. I want to speed up my optimizer and therefore i require the gradient of the constraints (with respect to $q$). This is how far i have come:
$$ \begin{aligned} dc = Bdx &= Bd\text{vec}\ (q^*q^\top)\\ &=B\text{vec}\ (q^*dq^\top+dq^*q^\top) \\ &=B\text{vec}\ (q^H:dq)+B\text{vec}\ (q^\top:dq^*) \end{aligned} $$
However, i cannot seem to get rid of the $\text{vec}$ operator. If i "matricize" the left side to remove the vectorization at the right side, i cannot get to $\frac{\partial c}{\partial q}$ anymore. Anyone got some brilliance for me?
Update: The last line of my derivation is incorrect i think. $q^H\in\mathbb{C}^{12}$ while $dq\in\mathbb{C}^{1\times 12}$, so you cannot use the Frobenius product here.