Today, Zama announces the release of a new version of Concrete-Numpy. In this blog post we will be walking you through all updates of each version from Concrete Numpy v0.6 to the latest Concrete Numpy v0.8.

## Concrete Numpy v0.6

Indeed, Concrete Numpy was re-written from scratch for v0.6.0 in order to reduce technical debt.

We cleaned up old design decisions that were no longer relevant and improved the overall organization of our repository.

Along the way, several breaking changes have been introduced:

- Official abbreviation of Concrete Numpy changed from `hnp` to `cnp`
- `hnp.NPFHECompiler` renamed to `cnp.Compiler`
- `hnp.NPFHECompiler.compile_on_inputset` renamed to `cnp.Compiler.compile`
- `hnp.CompilationConfiguration` renamed to `cnp.Configuration`
- `hnp.CompilationArtifacts` renamed to `cnp.DebugArtifacts`

**Virtual Circuits**

During prototyping, it may be desirable to ignore bit-width constraints to see what will be possible in the feature or to precisely determine the needs of the problem. For those cases, Virtual Circuits are introduced. When enabled, they disable bit-width constraints and revert execution to simulation. Thus, they are not meant for production, but exist to prototype and determine requirements.

**Library Compilation**

Concrete Numpy compiles your circuits with Concrete Compiler, which converts its input to assembly. Previously, this assembly was kept in memory and execution happened like that (JIT Compilation). Now, library compilation, which is creating a shared object, is introduced and made the default. While not advised, the option to revert back to previous behavior exists, `jit=True`.

**Integration with Client/Server Architectures**

Deployment with Concrete Numpy wasn’t possible as the compiled circuit had all the functionalities (i.e., encryption, evaluation, decryption). Now, it’s possible to split the circuit into Client and Server components to separate those tasks. These constructs can be saved to disk, transferred, and work independently now. It’s a complicated system best described in the documentation.

**PBS Error Probability Configuration**

Each table lookup has a certain probability of error associated with the operation. Previously, this error probability was constant and assigned by the compiler. Now, it’s possible to set per Table Lookup error probability from Concrete Numpy. Increasing the probability of error will result in faster execution. So it’s a tradeoff you need to think about.

**Univariate Extension**

Univariate functions can be performed with a table lookup (as long as they are deterministic). Although it was possible, this required manual creation of the lookup table. Now, it’s much easier and much more readable.

**More NumPy functions**

- np.ones_like (Read more here).

- np.zeros_like (Read more here).

- np.around (Read more here).

## Concrete Numpy v0.7

**Signed Inputs**

In the previous versions, Concrete Numpy supported signed intermediate values and signed outputs, but signed inputs were not supported for technical reasons. Those issues are now resolved and it’s possible to have signed inputs as show below.

**Zeros and Ones Extensions**

It is very common to create tensors filled with 0s and 1s. Concrete Numpy now provides extensions to do that in the encrypted domain.

**Improved Error Messages**

Concrete Numpy tries to give clear error messages wherever it can. Some new error messages for certain conditions are introduced with this release.

This code will raise the following error:

**Concrete Numpy v0.8.0**

**Python 3.7 and 3.10 Support**

With the support for these Python versions, Concrete Numpy is now available in a large variety of services (e.g., Google Cloud, Kaggle).

**Large Bit Width Support on Circuits without Table Lookups**

For some applications, leveled operations and array manipulation operations are enough. In those cases, Concrete Numpy now supports up to 57-bits of precision.

**Assignment to Tensors**

Tensor manipulation with assignments is one of the most common features of NumPy, now it’s available in Concrete Numpy as well.

**Grouped 2D Convolutions**

Extending our initial support, we now support grouped 2D convolutions.

**Native Subtraction Between Encrypted Values**

In the previous versions of Concrete Numpy, subtraction was very limited, it’s not anymore.

**Invalid Value Detection During Inputset Evaluation**

Debugging in the presence of `Inf`, or `NaN` values was not straightforward before. Now, it’s baked into Concrete Numpy.

Will now result in the following error chain:

**Array Extension**

Creation of encrypted tensors during runtime is now easier than ever.

**Printing Optimizer Output**

Concrete Numpy is using the Concrete Optimizer to select cryptographic parameters. Now, it’s possible to see the parameters selected by the Concrete Optimizer.

This will print:

**More NumPy functions**

- np.broadcast_to (Read more here)

## Additional Links