Skip to content

Latest commit

 

History

History
105 lines (53 loc) · 2.71 KB

concrete.compiler.simulated_value_exporter.md

File metadata and controls

105 lines (53 loc) · 2.71 KB

module concrete.compiler.simulated_value_exporter

SimulatedValueExporter.


class SimulatedValueExporter

A helper class to create Values.

method __init__

__init__(value_exporter: SimulatedValueExporter)

Wrap the native C++ object.

Args: value_exporter (_SimulatedValueExporter): object to wrap

Raises: TypeError: if value_exporter is not of type _SimulatedValueExporter


method export_scalar

export_scalar(position: int, value: int) → Value

Export scalar.

Args: position (int): position of the argument within the circuit

value (int): scalar to export

Returns: Value: exported scalar


method export_tensor

export_tensor(position: int, values: List[int], shape: List[int]) → Value

Export tensor.

Args: position (int): position of the argument within the circuit

values (List[int]): tensor elements to export

shape (List[int]): tensor shape to export

Returns: Value: exported tensor


method new

new(
    client_parameters: ClientParameters,
    circuitName: str = 'main'
) → SimulatedValueExporter

Create a value exporter.