Compute the gradient of $$ z = | \lVert L x \lVert_2 - P | $$ where $ x \in \mathbb{C}^N $ and $ P \in \mathbb{R}_{+} $.
First, I make $ a = \lVert L x \lVert_2 - P $. Also, since $ | a | $ is non-differentiable, its subdifferential is defined as $$ \partial z = \begin{cases} -1, & \text{if}\ a < 0 \\ 1, & \text{if}\ a > 0 \\ (-1,1), & \text{if}\ a = 0 \\ \end{cases} $$
Furthermore, $$ \partial a = x^H L^H L (\partial a) $$ On the other hand, $ | a | = \max \{ a, -a\} $. Thus,
$$ \partial z = \max \{\partial a, -\partial a\} = \max \{ x^H L^H L (\partial a), -x^H L^H L (\partial a) \} $$
The sub-gradient therefore is given by
$$ \nabla_x z = x^H L^H L \circ sign(x^H L^H L) $$
However, I am not sure of this result. Are the procedure and the result correct?