Circular ensembles#

This module provides tools for computations of integrals of polynomials on the circular ensembles.

Circular ensembles Python interface

References

[1] Matsumoto, S. (2013). Weingarten calculus for matrix ensembles associated with compact symmetric spaces. arXiv preprint arXiv:1301.5401.

haarpy.circular_ensembles.weingarten_circular_orthogonal(permutation, coe_dimension)[source]#

Returns the circular orthogonal ensemble’s Weingarten functions

Parameters:
  • permutation (Permutation | tuple[int, ...]) – A permutation of the symmetric group \(S_{2p}\) or its coset-type

  • coe_dimension (Symbol) – The dimension of the circular orthogonal ensemble

Returns:

The Weingarten function

Return type:

Expr

Examples

>>> from sympy import Symbol
>>> from sympy.combinatorics import Permutation
>>> from haarpy import weingarten_circular_orthogonal
>>> d = Symbol("d")
>>> weingarten_circular_orthogonal(Permutation(3)(0,1), 4)
Fraction(3, 70)
>>> weingarten_circular_orthogonal(Permutation(3)(0,1), d)
(d + 2)/(d*(d + 1)*(d + 3))
>>> weingarten_circular_orthogonal((1,1), d)
(d + 2)/(d*(d + 1)*(d + 3))

See also

haarpy.symmetric.coset_type()

Returns the coset-type of a given permutation of the symmetric group

haarpy.orthogonal.weingarten_orthogonal()

Returns the orthogonal Weingarten function

haarpy.circular_ensembles.weingarten_circular_symplectic(permutation, cse_dimension)[source]#

Returns the circular symplectic ensembles Weingarten functions

Parameters:
  • permutation (Permutation) – A permutation of the symmetric group :math:`S_{2p}

  • cse_dimension (Symbol) – The dimension of the circular symplectic ensemble

Returns:

The Weingarten function

Return type:

Expr

Examples

>>> from sympy import Symbol
>>> from sympy.combinatorics import Permutation
>>> from haarpy import weingarten_circular_symplectic
>>> d = Symbol("d")
>>> weingarten_circular_symplectic(Permutation(3)(0,1), 4)
Fraction(-3, 140)
>>> weingarten_circular_symplectic(Permutation(3)(0,1), d)
(1 - d)/(d*(2*d - 3)*(2*d - 1))

See also

haarpy.symplectic.weingarten_symplectic()

Returns the symplectic Weingarten function

haarpy.circular_ensembles.haar_integral_circular_orthogonal(sequences, group_dimension)[source]#

Returns the integral over the circular orthogonal ensemble of a monomial sampled at random from the Haar measure

Parameters:
  • sequences (tuple[tuple[int, ...], ...]) – Sequences of matrix elements

  • group_dimension (Symbol) – The dimension of the circular orthogonal ensemble

Returns:

The integral under the Haar measure

Return type:

Expr

Raises:
  • ValueError – If sequences do not contain precisely two sequences

  • ValueError – If the sequences are of odd length

Examples

>>> from sympy import Symbol
>>> from haarpy import haar_integral_circular_orthogonal
>>> d = Symbol("d")
>>> seq_i, seq_j = (0, 0, 1, 2), (1, 0, 0, 2)
>>> haar_integral_circular_orthogonal((seq_i, seq_j), 7)
Fraction(-1, 280)
>>> haar_integral_circular_orthogonal((seq_i, seq_j), d)
-2/(d*(d + 1)*(d + 3))

See also

haarpy.symmetric.coset_type()

Returns the coset-type of a given permutation of the symmetric group

haarpy.symmetric.stabilizer_coset()

Returns all permutations that sends the first sequences to the second. For a single input, the function returns the stabilizer group with respect to the sequence

haarpy.circular_ensembles.weingarten_circular_orthogonal()

Returns the circular orthogonal ensemble’s Weingarten functions

haarpy.circular_ensembles.haar_integral_circular_symplectic(sequences, half_dimension)[source]#

Returns the integral over the circular symplectic ensemble of a monomial sampled at random from the Haar measure

Parameters:
  • sequences (tuple[tuple[Expr, ...], ...]) – Indices of matrix elements

  • half_dimension (Expr) – Half the dimension of the unitary group

Returns:

The integral under the Haar measure

Return type:

Expr

Raises:
  • ValueError – If parameter sequences do not contain precisely two sequences

  • ValueError – If either sequence is of odd length

  • TypeError – If parameter half_dimension is of type int while the sequences contain symbols

  • TypeError – If the parameter half_dimension is neither int nor Symbol

  • ValueError – If not all sequence indices are between 0 and 2*half_dimension - 1

  • TypeError – If sequences contains something other than Expr or int

  • TypeError – If the symbolic sequences have the wrong format

Examples

>>> from sympy import Symbol
>>> from haarpy import haar_integral_circular_symplectic
>>> d = Symbol("d")
>>> seq_i_num, seq_j_num = (0, 3, 2, 1), (0, 1, 2, 3)
>>> haar_integral_circular_symplectic((seq_i_num, seq_j_num), 2)
Fraction(1, 6)
>>> seq_i_symb, seq_j_symb = (0, d+1, d, 1), (0, 1, d, d + 1)
>>> haar_integral_circular_symplectic((seq_i_symb, seq_j_symb), d)
-1/(2*d*(2*d - 3)*(2*d - 1))

See also

haarpy.circular_ensembles.weingarten_circular_symplectic()

Returns the circular symplectic ensemble’s Weingarten functions