Permanent

Exact permanent computation

exqalibur.permanent_fl(M: Annotated[numpy.typing.NDArray[numpy.float64], '[m, n]', 'flags.c_contiguous'], ptype: str = '') float

Permanent of a square floating point matrix

Parameters:
  • M – Square matrix of reals

  • ptype – Name of a permanent computation algorithm. Accepted values are "glynn" and "ryser". By default, Glynn method is used only when using 1 or 2 threads. Ryser is otherwise used.

Returns:

The permanent value

See also exqalibur.Config to control how many CPU threads you allow you program to use.

exqalibur.permanent_cx(M: Annotated[numpy.typing.NDArray[numpy.complex128], '[m, n]', 'flags.c_contiguous'], ptype: str = '') complex

Permanent of a square complex matrix

Parameters:
  • M – Square matrix of complex values

  • ptype – Name of a permanent computation algorithm. Accepted values are "glynn" and "ryser". By default, Glynn method is used only when using 1 or 2 threads. Ryser is otherwise used.

Returns:

The permanent value

See also exqalibur.Config to control how many CPU threads you allow you program to use.

Permanent estimate computation

exqalibur.estimate_permanent_fl(M: Annotated[numpy.typing.NDArray[numpy.float64], '[m, n]', 'flags.c_contiguous'], n_iter: SupportsInt = 1, ptype: str = '') tuple[float, float]

Permanent estimate of a square floating point matrix, with a 99% confidence interval.

Parameters:
  • M – Square matrix of reals

  • n_iter – Number of iterations. The higher, the more accurate the result will be.

  • ptype – Name of a permanent computation algorithm. Currently, only “gurvits” is accepted.

Returns:

A tuple containing: * The permanent value (float) * The 99% confidence interval size

See also exqalibur.Config to control how many CPU threads you allow you program to use.

exqalibur.estimate_permanent_cx(M: Annotated[numpy.typing.NDArray[numpy.complex128], '[m, n]', 'flags.c_contiguous'], n_iter: SupportsInt = 1, ptype: str = '') tuple[complex, float]

Permanent estimate of a square complex matrix, with a 99% confidence interval.

Note

Permanent estimate on complex values is accurate for norm, but not for angles.

Parameters:
  • M – Square matrix of complex

  • n_iter – Number of iterations. The higher, the more accurate the result will be.

  • ptype – Name of a permanent computation algorithm. Currently, only “gurvits” is accepted.

Returns:

A tuple containing: * The permanent value (float) * The 99% confidence interval size

See also exqalibur.Config to control how many CPU threads you allow you program to use.