In this article, we find several novel and efficient quantum error-correcting codes (Qecc) by studying the structure of constacyclic (Ccc), cyclic (Cc), and negacyclic codes (NCc) over the ring Ak = Z(p)[r(1), r(2),..., r(k)]/<(r(b)((mb+1)) - r(b)), r(l)r(b) = r(b)r(l) = 0, b not equal l >, where p = q(m) for m, m(b) is an element of N, m(b)|(-1 + q) for all b, l is an element of {1 to k}, q = 3 is a prime, Z(p) is a finite field. We define distance-preserving gray map delta(k). Moreover, we determine the quantum singleton defect (QSD) of Qecc, which indicates their overall quality. We compare our codes with existing codes in recent publications. The rings discussed by Kong et al. (EPJ Quantum Technol 10:1-16, 2023), Suprijanto et al. (Quantum codes constructed from cyclic codes over the ring F-q + vFq + v(2)Fq + v(3)F(q) + v(4)F(q), pp 1-14, 2021. arXiv: 2112.13488v2 [cs.IT]), and Dinh et al. (IEEE Access 8:194082-194091, 2020) are specific cases of our work. Furthermore, we construct several novel and optimum linear complementary dual (Lcd) codes over Ak.