Files
concrete/docs/dev/api/concrete.compiler.public_result.md
Benoit Chevallier-Mames e37a840e7e docs(compiler): adding API doc
2024-03-13 17:10:00 +01:00

3.1 KiB

module concrete.compiler.public_result

PublicResult.


class PublicResult

PublicResult holds the result of an encrypted execution and can be decrypted using ClientSupport.

method __init__

__init__(public_result: PublicResult)

Wrap the native Cpp object.

Args:

  • public_result (_PublicResult): object to wrap

Raises:

  • TypeError: if public_result is not of type _PublicResult

method deserialize

deserialize(
    client_parameters: ClientParameters,
    serialized_result: bytes
)  PublicResult

Unserialize PublicResult from bytes of serialized_result.

Args:

  • client_parameters (ClientParameters): client parameters of the compiled circuit
  • serialized_result (bytes): previously serialized PublicResult

Raises:

  • TypeError: if client_parameters is not of type ClientParameters
  • TypeError: if serialized_result is not of type bytes

Returns:

  • PublicResult: deserialized object

method get_value

get_value(position: int)  Value

Get a specific value in the result.


method n_values

n_values()  int

Get number of values in the result.


method serialize

serialize()  bytes

Serialize the PublicResult.

Returns:

  • bytes: serialized object