Quantum thermodynamics and semi-definite optimization