quantum optimization Dirac-3