Types
LBPQC is build on top of numpy
so the most common type on which operations are performed is numpy.ndarray
.
However in order to improve clarity of the code we rely heavily on python's type aliases that allow to differentiate between e.g vectors and matrices (which both are represented as ndarray
).
int
Aliases for int
are only used as an information about what kind of result does the functino returns.
ModInt
type ModInt = int
Represents integers from interval \([0, q)\) for some positive integer \(q\).
CenteredModInt
type CenteredModInt = int
Represents integers from interval \([-\frac{q}{2}, \frac{q}{2})\) for some positive integer \(q\).
Vector
Vector
type Vector = np.ndarray
VectorFloat
type Vector = np.ndarray[float]
VectorInt
type Vector = np.ndarray[int]
VectorModInt
type Vector = np.ndarray[int]
VectorCenteredModInt
type Vector = np.ndarray[int]
Matrix
Matrix
type Matrix = np.ndarray
MatrixFloat
type Matrix = np.ndarray[float]
MatrixInt
type Matrix = np.ndarray[int]
MatrixModInt
type Matrix = np.ndarray[int]
MatrixCenteredModInt
type Matrix = np.ndarray[int]