pysymmpol.partitions package

Submodules

pysymmpol.partitions.conjugacy module

class pysymmpol.partitions.conjugacy.ConjugacyClass(_conjugacy_vector: dict)[source]

Bases: object

Represents the conjugacy class of partitions. For example, the partition L = (5, 3, 2, 2, 2, 1, 1) can represented by L = (1: 2, 2: 3, 3: 1, 4: 0, 5: 1) that means 2 rows of length 1, 3 rows of length 2, 2 rows of length 3, 0 rows of length 4 and 1 row of length 5.

To avoid cluttering, we could simply write the vector k = (2, 3, 1, 0, 1) to describe the same partition. We do it in an internal method below, but we will return dictionaries to avoid confusion with the partitions.

The dictionary must be in the form {1: k1, 2: k2, …, n: kn}

The vectors k = (k1,k2, …, kn) represents one conjugacy class of the symmetric group S_n, and for this reason, we call it conjugacy class vectors.

In terms of the Heisenberg algebra, the components of these vectors denote the power of the Heisenberg operator J_{-n} when acting on the vacuum state |0>

_conjugacy_vector: dict
property boxes: int

Gives the number of boxes in the diagram.

property columns: int

Gives the number of columns in this diagram. for the vector (1: k1, …, n: kn), the number of columns is n: the last entry in the dictionary. (max iterates over the keys).

property conjugacy: tuple

Getter for the conjugacy class vector

conjugacy_partition() tuple[source]

Converts the conjugacy class vector to the partition notation. Example: [1,2,0,4] is equivalent to the Young diagram [4,4,4,4,2,2,1].

These vectors also denote the bosonic partition state that we can build with the bosonic states power of the operators J_{-n} that acts on the vaccum state |0>.

The algorithm works as follows: We first create an empty array partition = [] and we define the range for the loop to be the length of the vector k: In our case [1,2,0,3], i = 0,1,2,3.

  • loop 01: i = 0 k[0] = 1:

    row = [1] partition = [] U [1] = [1]

  • loop 02: i = 1 k[1] = 2

    row = [2,2] partition = [1] U [2,2] = [1,2,2]

  • loop 03: i = 2 k[2] = 0

    row = [] partition = [1,2,2] U [] = [1,2,2]

  • loop 04: i = 3 k[3] = 4

    row = [4,4,4,4] partition = [1,2,2] U [4,4,4,4] = [1,2,2,4,4,4,4]

Then when we put it in decreasing order we find [4,4,4,4,2,2,1]

draw_diagram(n=0) None[source]

Here we have a pictorial representation of the Young diagram associated to the conjugacy class in French notation. Here I just call the function for the partition states.

property rows: int

Gives the number of rows in this diagram. This is the sum over the conjugacy.

pysymmpol.partitions.states module

class pysymmpol.partitions.states.State(_level: int)[source]

Bases: object

Defines the bosonic and fermionic states for a given integer n.

_conjugacy_states() tuple[source]

For a level n, this method gives all vector k (the conjugacy class states) that belong to this subspace. Remember that these states are built with the operators J_{-m} of the Heisenberg algebra. In other words, these are bosonic states.

_level: int
conjugacy_states() tuple[source]

Returns the previous method in the dictionary form.

property level: int
partition_states() tuple[source]

For the level n, this method gives the partitions that belong to this subspace. These states are built from the the fermionic operators.

pysymmpol.partitions.young module

class pysymmpol.partitions.young.YoungDiagram(_partition: tuple)[source]

Bases: object

Represents Young diagrams in the standard partition notation. It is a monotonic decreasing sequence L = (L1, L2, L3, …,Ln) with L1 >= L2 >=L3 >= … >= Ln.

Example: (3,2,2,1).

_partition: tuple
property boxes: int

This gives the number of boxes in the diagram.

property columns: int

This gives the number of columns in the diagram.

conjugacy_partition() dict[source]

Converts the partition notation to the conjugacy class notation Example: [4,4,4,2,2,1] to {1: 1, 2: 2, 3: 0, 4: 3}.

The algorithm works as follows:

It creates a list of zeros with length equal to the largest row. In our case, 4 conjugacy = [0, 0, 0, 0].

It iterates over the partition, adding 1s to the corresponding slot in the conjugacy vector, for example partition (4,4,4,2,2,1) gives - loop 01: i = 4

conjugacy[3] = 1 conjugacy = [0,0,0,1]

  • loop 02: i = 4

    conjugacy[3] = 2 conjugacy = [0,0,0,2]

  • loop 03: i = 4

    conjugacy[3] = 3 conjugacy = [0,0,0,3]

  • loop 04: i = 2

    conjugacy[1] = 1 conjugacy = [0,1,0,3]

  • loop 05: i = 2

    conjugacy[1] = 2 conjugacy = [0,2,0,3]

  • loop 06: i = 1

    conjugacy[0] = 1 conjugacy = [1,2,0,3]

At the end we convert to a dictionary, and conjugacy = {1: 1, 2: 2, 3: 0, 4: 3}

contains(other_young: YoungDiagram) bool[source]

Checks if the original partition contains the new one.

count_diagonal() int[source]

Gives the number of boxes in the diagonal.

draw_diagram(n: int = 0) None[source]

Pictorial representation of the Young/Ferrers diagram in French notation.

frobenius_coordinates(fermionic: bool = True) list[source]

Frobenius coordinates for the diagrams are determined as follows:

Given a partition L = (L1, L2, …), the Frobenius coordinates are defined by (a_n , b_n), where a_n = L_n -n and b_n - L’_n - n, (the prime denotes the conjugate diagram). Note that we subtract 1 because Python lists start at 0. For fermionic representations (which are the default), we need to add 1/2 because indices are half-integers. Therefore, an overall offset of -1/2 is required for fermionic representation, while -1 suffices for the standard representation.

Additionally, I prefer to consider the representation where all negative sites are occupied. Thus, in the fermionic representation, I adjust the notation to -b for clarity.

interlaces(other_young: YoungDiagram) bool[source]

Checks if the original partition interlaces the new one.

property partition: tuple

Gives the partition notation for the Young diagram.

property rows: int

This gives the number of rows in the diagram.

transpose() YoungDiagram[source]

Gives the transposed (or conjugate) Young diagram. For example, the conjugate of [3,2] is [2,2,1].

Here I follow an interesting property that Knuth mentions in TAOCP, volume 4A, equation (11) of section 7.2.1.4 - Other representations of partitions. He claims that for any partiton L = (L1, L2, …), its coeficcients satisfy

Li - L(i+1) = LTci

where LTc is the conjugate of L in the conjugacy class notation.

Module contents