# ConvexOptimization

Source: https://docs.q-ctrl.com/references/boulder-opal/boulderopal/noise_reconstruction/ConvexOptimization

```python
class boulderopal.noise_reconstruction.ConvexOptimization(power_density_lower_bound, power_density_upper_bound, regularization_hyperparameter)
```

Configuration for noise reconstruction with the convex optimization (CVX) method.

### Parameters
* **power_density_lower_bound** (*float*) – The lower bound for the reconstructed power spectral densities.
  It must be greater than or equal to 0.
* **power_density_upper_bound** (*float*) – The upper bound for the reconstructed power spectral densities.
  It must be greater than the power_density_lower_bound.
* **regularization_hyperparameter** (*float*) – The regularization hyperparameter $\lambda$.

## Notes

The CVX method finds the estimation of the power spectral density (PSD) matrix
${\mathbf S}$ by solving the optimization problem:

$$
{\mathbf S}_{\mathrm{est}} = \mathrm{argmin}_{\textbf S} (\| F'{\mathbf S} -
{\mathbf I} \|_2^2 + \lambda \| L_1 {\mathbf S} \|_2^2) ,
$$

where $F^\prime$ is the matrix of weighted filter functions and
$\| \bullet \|_2$ denotes the Euclidean norm and $L_1$ is the
first-order derivative operator defined as

$$
\begin{align}
    L_1 =
      \begin{bmatrix}
        -1 &      1 &         &    \\
           & \ddots &  \ddots &     \\
           &        &      -1 & 1    \\
      \end{bmatrix}_{(K - 1) \times K} .
\end{align}
$$

$\lambda$ is a positive regularization hyperparameter which determines the
smoothness of ${\mathbf S}_{\mathrm{est}}$. If you provide uncertainties in
measurements, this method calculates the uncertainties in estimation using a Monte
Carlo method.
