Code like this is used to do evaluation of quantum expressions, in this case, the commutator, see [1]. These are used, for example, to evaluate expressions or evaluate quantum operators applied to states.
Sean [1] https://github.com/sympy/sympy/blob/master/sympy/physics/quantum/commutator.py#L175 On Tue, Feb 3, 2015 at 9:43 AM, Anurag Hota <ahot...@gmail.com> wrote: > Hello Sir, > Sorry I am a bit late this year. I went through the Quantum Computation > module . I would like to work on the Quantum error correction, > Solovay-Kitaev algorithm, gate+circuit simplification using genetic > algorithms, etc. > > I am currently working on thw W gate construction and implementing > _represent_ZGate in OracleGate. > Please reply what else can I fix as of now. > > I had a few doubts. > In the Gate module ( > http://docs.sympy.org/latest/_modules/sympy/physics/quantum/gate.html#Gate) > , > > For any gate, > > def _eval_commutator_TGate(self, other, **hints): > """[CNOT(i, j), T(i)] == 0.""" > return self._eval_commutator_ZGate(other, **hints) > > For every gates , we have these kind of methods and so on. What do they > represent? > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sympy+unsubscr...@googlegroups.com. > To post to this group, send email to sympy@googlegroups.com. > Visit this group at http://groups.google.com/group/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/79f23eed-4b6c-4a5c-b0ef-c68b177e1217%40googlegroups.com > <https://groups.google.com/d/msgid/sympy/79f23eed-4b6c-4a5c-b0ef-c68b177e1217%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CALNFbOnZXDvkYR4bNS9y13AJMdXxyhcLnvV_rdiP81jYHP_%2BtQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.