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('', 'w')
print(generate_qua_script(prog, config), file=sourceFile) 

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