Skip to content

Commit

Permalink
docs(frontend): update simulation documentation to be more consistent…
Browse files Browse the repository at this point in the history
… with the rest of the docs
  • Loading branch information
yuxizama authored and BourgerieQuentin committed Aug 28, 2024
1 parent 5406273 commit 406a695
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions docs/execution-analysis/simulation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Simulation
This document explains how to use simulation to speed up the homomorphic execution during development, enabling faster prototyping while accounting for the inherent probability of errors in Fully Homomorphic Encryption (FHE) execution.
This document explains how to use simulation to speed up the development, enabling faster prototyping while accounting for the inherent probability of errors in Fully Homomorphic Encryption (FHE) execution.

## Using simulation for faster prototyping
During development, the speed of homomorphic execution can be a blocker for fast prototyping. Although you can directly call the function you want to compile, this approach does not fully replicate FHE execution, which involves a certain probability of error (see [Exactness](../core-features/table\_lookups.md#table-lookup-exactness)).
Expand Down Expand Up @@ -33,10 +33,6 @@ After the simulation runs, it prints the following results:
[1, 4, 9, 16, 16, 36, 49, 64, 81, 100]
```

{% hint style="warning" %}
Some operations are not yet supported in simulation, resulting in compilation failures. In such cases, you can revert to graph execution using `circuit.graph(...)` instead of `circuit.simulate(...)`. While this method doesn't simulate FHE, it evaluates the computation graph, allowing you to simulate the operations without FHE-related errors.
{% endhint %}

## Overflow detection in simulation

Overflow can happen during an FHE computation, leading to unexpected behaviors. Using simulation can help you detect these events by printing a warning whenever an overflow happens. This feature is disabled by default, but you can enable it by setting `detect_overflow_in_simulation=True` during compilation.
Expand Down

0 comments on commit 406a695

Please sign in to comment.