Finding good quantum codes using the Cartan form