qrunch.quantum.circuits.translators.qasm_translator
Translator to translate Kvantify Qrunch circuits to OpenQASM 3 circuits.
Classes
Translator that translate from universal gate circuit to OpenQASM 2.0. |
|
Translator that translate from synthesized universal gate circuit to OpenQASM 3.0. |
- class Qasm2Translator
Bases:
Translator[QasmStr]Translator that translate from universal gate circuit to OpenQASM 2.0.
- __init__(*args, **kwargs)
- translate(synthesized_circuit: SynthesizedUniversalGateCircuit) QasmStr
Translate a SynthesizedUniversalGateCircuit to OpenQASM 2.0.
Requires that the parameters are fully specified.
- Parameters:
synthesized_circuit (SynthesizedUniversalGateCircuit) – Circuit to translate.
- Return type:
- class Qasm3Translator
Bases:
Translator[QasmStr]Translator that translate from synthesized universal gate circuit to OpenQASM 3.0.
- __init__(*, use_physical_qubits: bool = False) None
Initialize an instance of the Open QASM 3.0 translater.
- Parameters:
use_physical_qubits (bool) – Whether to use physical qubits or no
- Return type:
None
- translate(synthesized_circuit: SynthesizedUniversalGateCircuit) QasmStr
Translate a SynthesizedUniversalGateCircuit to OpenQASM.
Requires that the parameters are fully specified.
- Parameters:
synthesized_circuit (SynthesizedUniversalGateCircuit) – Circuit to translate.
- Return type: