In this paper linear and cyclic codes over the ring R = Z4+u1Z4+:::+utZ4 are investigated, where t 1. The structure of Euclidean and Hermitian linear selfdual codes over R is studied. A distance preserving Gray map from R to Zt+1 4 is also presented. Moreover, quadratic residue codes over R are defined. Further, Euclidean and Hermitian self-dual families of quadratic residue codes over R are observed and four Hermitian self-dual codes of length p over the ring R are introduced if p 1 (mod 8) or p 1 (mod 8). In particular, a method is presented to construct quantum codes over F2 from Gray images of quadratic residue codes over the ring R. The results are presented in the table.