Implementation of n-qubit Deutsch–Jozsa algorithm using resonant interaction in cavity QED