cqlib.utils.qasm_to_qcis package
Submodules
cqlib.utils.qasm_to_qcis.data module
- class cqlib.utils.qasm_to_qcis.data.Instruction(name: str, qubit_index: List[int], arguments: List[int | float] | None = None)
Bases:
objectBasic data class. Used for storing data from qasm ast and output data with QCIS.
- arguments: List[int | float] | None = None
- name: str
- qubit_index: List[int]
cqlib.utils.qasm_to_qcis.qasm_to_qcis module
- class cqlib.utils.qasm_to_qcis.qasm_to_qcis.QasmToQcis(rule=None)
Bases:
objectClass to transform QASM to QCIS order.
Only use QCIS native gate by default rules.
QCIS native gates include: X2P, Y2P, RZ, X2M, Y2M, CZ
- convert_to_qcis(qasm: str)
Convert QASM string into QCIS string.
- Parameters:
qasm (str) – input qasm string.
- Returns:
converted qcis string.
- Return type:
str
- convert_to_qcis_from_file(qasm_file: str | Path)
Convert QASM order from file into QCIS string.
- Parameters:
qasm_file (str | Path) – input qasm file path.
- Returns:
converted qcis string.
- Return type:
str