Function libwalrus::torontonian_quad(std::vector<std::complex<double>>&)

Function Documentation

std::complex<double> libwalrus::torontonian_quad(std::vector<std::complex<double>> &mat)

Computes the Torontonian of an input matrix.

If the output is NaN, that means that the input matrix does not have a Torontonian with physical meaning.

This is a wrapper around the templated function libwalrus::torontonian for Python integration. It accepts and returns complex double numeric types, and returns sensible values for empty and non-even matrices.

In addition, this wrapper function automatically casts all matrices to type complex<long double>, allowing for greater precision than supported by Python and NumPy.

Return

Torontonian of the input matrix

Parameters
  • mat: flattened vector of size \(n^2\), representing an \(n\times n\) row-ordered symmetric matrix.