loom.executor.eka_circuit_to_qasm_converter

Copyright (c) Entropica Labs Pte Ltd 2025.

Use, distribution and reproduction of this program in its source or compiled form is prohibited without the express written consent of Entropica Labs Pte Ltd.

loom.executor.eka_circuit_to_qasm_converter.convert_circuit_to_qasm(input_circuit, syndromes=None, detectors=None, logicals=None, ancilla_channels=None)[source]

Converts a Circuit object into a qasm string

Parameter

input_circuit: Circuit

The circuit to be converted into a QASM string. The input circuit must be unrolled

syndromes: list

List of syndromes that are measured in the eka circuit

detectors: list

List of detectors that are measured in the eka circuit

logicals: list

List of logicals that are measured in the eka circuit

ancilla_channels: list[Channel]

List of channels to be considered as ancillas

returns:

A dictionary containing the following: - eka_to_qasm_syndromes: A dictionary that maps the EKA syndromes to the QASM measurements - eka_to_qasm_detectors: A dictionary that maps the EKA detectors to the QASM measurements - qasm_circuit: A QASM string containing the operations that represent the original input_circuit.

rtype:

dict