Page cover

polycircuit

The polycircuit dialect provides high-level operations mapped to reusable FHE components, enabling complex computations such as neural network activations and polynomial evaluations. These operations often work across multiple ciphertexts and contexts.

Examples

//Applies the ReLU activation function to an encrypted input.
%relu_out = polycircuit.relu %ciphertext, %ctx : (RLWECiphertext, Context) -> RLWECiphertext

//Evaluates a polynomial defined by the coefficients on an encrypted input. 
%eval = polycircuit.poly_eval %coeffs, %ciphertext, %ctx : (tensor<[n]>, RLWECiphertext, Context) -> RLWECiphertext

Last updated