<abstract><p>Let $ s \geq 1 $ be a fixed integer. In this paper, we focus on generating cyclic codes over the ring $ \mathcal{R}(\alpha_1, \alpha_2, \ldots, \alpha_s) $, where $ \alpha_i \in \mathbb{F}_q\backslash \{0\} $, $ 1 \leq i \leq s $, by using the Gray map that is defined by the idempotents. Moreover, we describe the process to generate an idempotent by using the formula (2.1). As applications, we obtain both optimal and new quantum codes. Additionally, we solve the DNA reversibility problem by introducing $ \mathbb{F}_q $ reversibility. The aim to introduce the $ \mathbb{F}_q $ reversibility is to describe IUPAC nucleotide codes, and consequently, 5 IUPAC DNA bases are considered instead of 4 DNA bases $ (A, \; T, \; G, \; C) $.</p></abstract>