Groups

Simple implementation of groups, based upon Cayley tables.

class qitensor.group.Group(group_name, element_names, m_table)

Bases: object

qitensor.group.dihedral_group(n)

Return the dihedral group S_n.

>>> from qitensor import dihedral_group
>>> S3 = dihedral_group(3)
>>> S3.order
6
>>> S3.elements
[<S3.r0>, <S3.r1>, <S3.r2>, <S3.s0>, <S3.s1>, <S3.s2>]
>>> S3.e
<S3.r0>
>>> S3.r1 * S3.s0
<S3.s1>
>>> import pickle
>>> id(S3) == id(pickle.loads(pickle.dumps(S3)))
True

Previous topic

Superoperators

Next topic

Experimental

This Page