Oh I haven't heard of cycotomics before, but after a bit of reading they seem like the right choice. Here's hoping it will work well for my use case, Thank you Dima!
Regards, James On Tuesday, May 12, 2020 at 7:16:15 PM UTC+10, Dima Pasechnik wrote: > > On Tue, May 12, 2020 at 9:38 AM James <jbu...@gmail.com <javascript:>> > wrote: > > > > Hi > > > > I've recently started using SageMath as part my Masters Research into > Mutually Unbiased Bases. I'm able to generate these Basis using finite > fields traces and complex roots of unity, but I am running into efficiency > issue. I would like to do some exact calculations(mostly matrix > multiplication), with these Bases/Matrices that I am generating, but the > calculations are taking a long time for even small orders, I would like to > at the very least work with matrices 25*25. Now I understand that long > computation time is expected with exact calculations but I am wondering if > I have implemented the construction poorly? > > Instead of using SR (Symbolic Ring) you can use something much more > efficient, e.g. cyclotomics. > sage: N=5 > sage: T=CyclotomicField(N) > sage: sqrt(T(N)) > 2*zeta5^3 + 2*zeta5^2 + 1 > sage: type(sqrt(T(N))) > <class > 'sage.rings.number_field.number_field_element.NumberFieldElement_absolute'> > > (or, perhaps, quadratic extension of QQ by sqrt(N) is what you need, > not sure what kind of extra ops you want to do with your N) > > HTH > Dima > > > > I've seen sage has some inbuilt parallel computing ability but am unsure > what if anything is natively parallel in sage and what I would need to do > myself. I did try searching the docs to find out what might be natively > parallel but couldn't find anything. I am considering looking into > HPC/parallel/AWS as solutions to help me calculate slightly larger orders > but not sure how viable and easy this would be? > > > > I'd also like to be able to simplify the complex number entries in my > matrices into polar form both for readability in the output and I thought > it may improve efficiency in the calculations? > > > > I've attached the Notebook I am working in which I have hopefully well > commented enough to understand. > > > > I would appreciate any feedback people would have for a Sage newbie. > > > > -- > > You received this message because you are subscribed to the Google > Groups "sage-support" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to sage-s...@googlegroups.com <javascript:>. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-support/5eb142c5-6645-4bed-a138-064b7d8a6b59%40googlegroups.com. > > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/bf148c98-bd42-4f2b-9718-bfd7f48156e3%40googlegroups.com.