# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fairmath.xyz/fhe-computer/isa/polycircuit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
