LocallyOptimizableUnitary.optimize
- abstractmethod LocallyOptimizableUnitary.optimize(env_matrix)[source]
Return the optimal parameters with respect to an environment matrix.
More specifically, return the parameters that maximize the real component of the trace of the product between env_matrix and this unitary:

- Parameters:
env_matrix (
npt.NDArray[np.complex128]) – Optimize with respect to this matrix. Has the same dimensions as this unitary.- Returns:
The parameters that optimizes this unitary.
- Return type:
list[float]