pytket.wasm

Handler for wasm files in pytket

class pytket.wasm.WasmFileHandler(filepath, check_file=True, int_size=32)[source]

Construct and optionally check a wasm module from a file for use in wasm Ops.

__init__(filepath, check_file=True, int_size=32)[source]

Construct a wasm file handler using a filepath to read a wasm module into memory.

Parameters:
  • filepath (str) – Path to the wasm file

  • check_file (bool) – If True checks file for compatibility with wasm standards. If False checks are skipped.

  • int_size (int) – length of the integer that is used in the wasm file