> For the complete documentation index, see [llms.txt](https://docs.fairmath.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fairmath.xyz/fhe-computer/isa/polycircuit.md).

# 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

{% code overflow="wrap" %}

```clike
//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
```

{% endcode %}
