In economy, viewed as a quantum system working as a circuit, each process at the microscale is a quantum gate among agents. The global configuration of economy is addressed by optimizing the sustainability of the whole circuit. This is done in terms of geodesics, starting from some approximations. A similar yet somehow different approach is applied for the closed system of the whole and for economy as an open system. Computations may partly be explicit, especially when the reality is represented in a simplified way. The circuit can be also optimized by minimizing its complexity, with a partly similar formalism, yet generally not along the same paths.