The quickstart example at Quick Start — OpenFHE-Numpy 1.4.0.3 documentation does not run. There is a segfault on import caused by importing openfhe_numpy before openfhe. After switching the import statements, there is another error caused by batch_size being undefined. Looking at examples/python/simple_square_matrix_product.py, batch_size should be set to ring_dim // 2. After running with these changes, the result of the matrix multiplication is incorrect.
The OpenFHE-Numpy result of A @ A is:
[[7.00000000e+00 8.00000000e+00]
[1.20000000e+01 2.92704262e-13]]
The plain numpy result of A @ A:
[[ 7 10]
[15 22]]
Changing the mode from “zero” to “tile” when creating the OpenFhe-Numpy array fixed the issue. I have a fixed quickstart example on my Github. My Github username is tsunami935.