API documentation

API documentation#

Backends for processing pytket circuits with Quantinuum devices

class pytket.qir.QIRFormat(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#

Return types qir, options are BINARY for a binary output and STRING for a string output

pytket.qir.pytket_to_qir(circ: Circuit, name: str = 'Generated from input pytket circuit', qir_format: QIRFormat = QIRFormat.BINARY, wfh: WasmFileHandler | None = None, int_type: int = 64, cut_pytket_register: bool = False) str | bytes | None#

converts given pytket circuit to qir

  • circ – given circuit

  • name – name for the qir module created

  • qir_format – format of the generated qir, default value is binary

  • wfh – wasm file handler used when creating the circuit. Only needed when there are wasm calls in the circuit.

  • int_type – size of each integer, allowed value 32 and 64

  • cut_pytket_register – breaks up the internal scratch bit registers into smaller registers, default value false