Skip to content

Feedback and support

Join us in our QUA Discord server discord. You are welcome to ask questions, suggest features and share your experience!

Serializing QUA Programs

It is possible to serialize a QUA program and a config file using these commands:

from qm import generate_qua_script

qmm = QuantumMachinesManager(...)  # Optional - Used for config validation

config = {}

with program() as prog:
    ...

sourceFile = open('debug.py', 'w')
print(generate_qua_script(prog, config), file=sourceFile) 
sourceFile.close()

This code will create a file, debug.py, which is a standalone runnable serialized QUA program.