I am try to multiply two polynomial quotient ring of type $R=Z[x]/\phi(x) $ in sage using Fast Fourier Transform.:
a=Rq.random_element()
R. = PolynomialRing(GF(40961)) # Gaussian field of integers
Y. = R.quotient(X^(dimension) + 1) # Cyclotomic field
ouput=Y(a)*Y(a)
I have found the following code on github to do this job but it is for simple polynomials and when I run this code for quotient polynomial, It give me following Type error