---
title: "QUA"
date: "2023-03-22T11:01:08+00:00"
modified: "2025-12-18T17:49:40+00:00"
url: "https://www.quantum-machines.co/products/qua-universal-quantum-language/"
description: "QUA: the universal pulse-level quantum language that lets you implement any quantum protocol as easily and seamlessly as writing pseudocode."
---

# QUA

## The Pulse-Level Language for Hybrid Programming

Easily and quickly develop quantum-classical workflows

 [ Request a Demo ](#)

     ```
```clike
with program() as prog:
    f = declare(int)
    a = declare(int)
    p = declare(fixed)
    t = declare(int)
    I = declare(fixed)
    b_excited_state = declare(bool)
    with for_(f, -700e6, f<700e6, f+10e6):
        update_frequency("qubit", f)
        with for_(a, 0, a<1.5, a+0.01):
            with for_(p, 0, p<1, p+0.1):
                with for_(t, 1, t<1000, t+1):
                    reset_global_phase()

                    play("x180", "qubit")
                    wait(t, "qubit")
                    frame_rotation_2pi(p, "qubit")
                    play("x180", "qubit")

                    align("qubit", "resonator")

                    measure("readout", "resonator", dual_demod.full("optimized_cos_weights", "optimized_sin_weights", I))

                    assign(b_excited_state, I > 0.1)
                    save(b_excited_state, "b_excited_state")
                    play("x180", "qubit", condition=b_excited_state)
```
																						<div class="circles">
																							<div class="circle"></div>
																							<div class="circle"></div>
																							<div class="circle"></div>
																						</div>
																						<div class="code-overlay js-codeOverlay"></div>

```

   QUA is an intuitive pulse-level programming language used with Quantum Machines’ [OPX hybrid controllers](https://www.quantum-machines.co/products/opx1000/). It is the core of QM’s comprehensive hybrid development platform – which also features automated calibrations via QUAlibrate, and access to a vast library of control applications. QUA seamlessly merges quantum and classical programming. With QUA, quantum builders can easily program complex algorithms that were previously impossible, reaching milestones faster and accelerating the path to breakthrough results.

 [Request the Brochure ](/request-the-qua-brochure/)

  ## Comprehensive

QUA unifies quantum operations at the pulse level with classical resources, including Turing-complete computations and rich control flow (if/else, for, while loops and swith cahse, using real-time parameters). Unlike conventional programming models that separate quantum and classical code, QUA integrates both into a single, frictionless framework. This removes latency, optimizes performance, and enables real-time quantum-classical interaction – from simple pulse generation to the most advanced adaptive circuit execution. QUA further provides advanced upper-layer interfaces, ensuring smooth integration with industry-leading frameworks such as Qiskit, OpenQASM3 for circuit-level coding, and CUDA-Q (HPC-QC application development).

 [Download QUA Brochure](/request-the-qua-brochure/)

\#2-point-Ramsey Real-Time Frequency Tracking

```
def 2-point-Ramsey_Tracking():
    with for_(n, 0, n < 2**any_power_of_two, n + 1):
        assign(f, f_res_corr + plus_delta)
        update_frequency('qubit', f)
        Ramsey(t_fixed)
        assign(state_1, I > ge_threshold)
        assign(state_1_avg, state_1_avg_avg + (Cast.to_fixed(state_1) >> any_power_of_two))
        assign(f, f_res_corr + minus_delta)
        update_frequency('qubit', f)
        Ramsey(t_fixed)
        assign(state_2, I > ge_threshold)
        assign(state_2_avg, state_2_avg_avg + (Cast.to_fixed(state_2) >> any_power_of_two))
    corr = calculate_freq_correction(state_1_avg, state_2_avg)

with program() as any_quantum_sequence:
    with for_(loops, 0, loops_max, loops + 1):
        2-point-Ramsey_Tracking()
        your_advanced_sequence()

```

 [Download QUA Brochure](/request-the-qua-brochure/)

## Expressive

Think it, do it! With Its Python-like sentex, program protocol as easily as writing pseudocode. Describe any quantum experiment natively, from active reset to AI-based multi-qubit calibration and quantum error correction.

\#2D Ramsey map

```
def Ramsey(t):
    play('pi_half', 'qubit')
    wait(t)
    play('pi_half', 'qubit')
    align('qubit', 'resonator')
    measure('qubit', 'resonator', …, I)

with program() as 2D_Ramsey_Map:
    with for_(n, 0, n < N_avg, n + 1):
        with for_(f, f_min, f < f_max, f + df):
            update_frequency('qubit', f)
            with for_(t, t_min, t < t_max, D + dt):
                Ramsey(t)
                active_reset('qubit')

```

## Scalable

QUA scales with your roadmap, allowing you to code a thousands of qubits as easily as a single one. No overhead, no rewriting codes – just seamless scaling by OPX controllers and updating your system configuration file. The QUA compiler will orchestrate all controllers as one, handling synchronization and data sharing.

\#Multi-qubit Active Reset and Ramsey

```
for qubit_n in qubits:
    measure(qubit_n, 'resonator', …, I)
    play('pi', qubit_n, condition = I > threshold)

    with for_(t, t_min, t < t_max, D + dt):
        Ramsey(qubit_n, t)
align()

```

## Open Source

QUA is an open-source software. It is used by thousands of users in academia, national labs, and commercial companies worldwide, for quantum research and development. Explore QUA’s capabilities and get started with real-world examples on GitHub.

 [QUA in GitHub](https://github.com/qua-platform)

![](https://www.quantum-machines.conew1.wpenginepowered.com/wp-content/uploads/2025/02/image13.png)

 [QUA in GitHub](https://github.com/qua-platform)

## Benefits

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/03/iconob1.svg)

#### Hybrid Programming

QUA unifies quantum operations at the pulse level with classical resources, including Turing-complete computations and rich control flow.

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/03/conob2.svg)

#### Executed in Real Time

Pulse Processing Unit (PPU) executes QUA programs in quantum coherence time cale, ensuring optimal performance with precise synchronization and minimal latency.

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/03/conob3.svg)

#### Open Source

Researchers and developers from hundreds of academic labs and commercial companies around the world share code, reduce development time, and make the new possible.

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/04/parametic-pulse-programming.svg)

#### Parametric Pulse Programming

No long upload times and only minimal memory usage. Pulses are generated and manipulated on the fly.

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/04/libraries.svg)

#### A Vast Library of control applications

 From characterization to QEC and real-time Bayesian estimation, numerus out-of-the-box workflows.

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/04/wide-range-of-qubit-tech.svg)

#### All Common Qubit Modalities

Superconducting, quantum dots, defect centers and optically addressable qubits.

  ## What’s Possible with QUA?

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/04/Quantum-sensing.svg)

#### Quantum Sensing

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/04/Case-study.svg)

#### Quantum Technologies Research &amp; Development

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/04/Quantum-communication.svg)

#### Quantum Communication

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/04/Pinned-resource.svg)

#### Quantum Computing

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/04/Hybrid-Quantum.svg)

#### Hybrid Quantum – Classical Algorithmics

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/04/Quantum-simulations.svg)

#### Quantum Computing

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/04/Quantum-firmware-development.svg)

#### Quantum Firmware Development

  ## QUA Community and Libraries

#### SWAP Spectroscopy Improved with Predistortion Digital Filters

 [See Now](https://github.com/qua-platform/qua-libs/tree/main/Quantum-Control-Applications/Superconducting/Multiple%20Flux%20Tunable%20Transmons/Use%20Case%201%20-%20Two%20qubit%20gate%20optimization%20with%20cryoscope#two-qubit-swap-spectroscopy-improved-with-pre-distortion-digital-filters)

#### Qubit Frequency Tracking

Performed in the Lab of Prof. David Schuster in the University of Chicago.

 [See Now](https://github.com/qua-platform/qua-libs/tree/main/Quantum-Control-Applications/Superconducting/Single%20Fixed%20Transmon/Use%20Case%201%20-%20Schuster%20Lab%20-%20Qubit%20Frequency%20Tracking#qubit-frequency-tracking)

#### Optimized Readout with Optimal Weights.

 [See Now](https://github.com/qua-platform/qua-libs/tree/main/Quantum-Control-Applications/Superconducting/Single%20Fixed%20Transmon/Use%20Case%202%20-%20Optimized%20readout%20with%20optimal%20weights#optimized-readout-with-optimal-weights)

#### Cryoscope

Performed in the Lab of Prof. Sorin Paraoanu in Aalto University.

 [See Now](https://github.com/qua-platform/qua-libs/tree/main/Quantum-Control-Applications/Superconducting/Single%20Flux%20Tunable%20Transmon/Use%20Case%201%20-%20Paraoanu%20Lab%20-%20Cryoscope#cryoscope)

#### DRAG Pulse Calibration

 [See Now](https://github.com/qua-platform/qua-libs/tree/main/Quantum-Control-Applications/Superconducting/Single%20Flux%20Tunable%20Transmon/Use%20Case%202%20-%20DRAG%20coefficient%20calibration#derivative-removal-by-adiabatic-gate-drag-and-ac-stark-shift-calibration)

#### 2D Atom Sorting

Performed in the Lab of Prof. Mark Saffman in the University of Wisconsin-Madison.

 [See Now](https://github.com/qua-platform/qua-libs/tree/main/Quantum-Control-Applications/AMO/Use%20Case%201%20-%20Saffman%20Lab%20-%20Atom%20Sorting#atom-sorting-with-the-opx)

#### High resolution time-tagging

Performed in the lab of Prof. Faraon at Caltech.

 [See Now](https://github.com/qua-platform/qua-libs/tree/main/Quantum-Control-Applications/Optically%20addressable%20spin%20qubits/Cryogenic%20nanophotonic%20cavity/Use%20case%201%20-%20Faraon%20Lab%20-%20sub-ns%20timetagging#high-resolution-time-tagging)

#### CPMG

Performed in the lab of Prof. Sekhar at Darmouth College.

 [See Now](https://github.com/qua-platform/qua-libs/tree/main/Quantum-Control-Applications/Optically%20addressable%20spin%20qubits/Electron%20Spin%20Resonance/Use%20case%201%20-%20Sekhar%20Lab%20-%20CPMG#carr-purcell-meiboom-gill-cpmg-in-an-nv-ensemble-with-electron-spin-resonance-esr)

#### Fast 2D scans using a spiral pattern

Performed in the lab of Prof. Natalia Ares in the University of Oxford.

 [See Now](https://github.com/qua-platform/qua-libs/tree/main/Quantum-Control-Applications/Quantum-Dots/Use%20Case%201%20-%20Fast%202D%20Scans#fast-two-dimensional-scans-using-a-spiral-pattern)

Find additional QUA examples from labs across the world in the QUA GitHub zone, [**Access Here &gt;&gt;**](https://github.com/qua-platform)
Talk to us to learn how QUA can help you, for a QUA demo and for access to the growing QUA community.

     ## Accelerate the Realization of Practical Quantum Computing

 [Contact us](/contact-us/)

## Take the Next Step

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/05/Asset-3.svg)

Have a specific experiment in mind and wondering about the best quantum control and electronics setup?

 [Talk to an Expert](https://www.quantum-machines.co/contact-us/)

 ![](https://www.quantum-machines.co/wp-content/uploads/2023/02/Group-175897-1.svg)

Want to see what our quantum control and cryogenic electronics solutions can do for your qubits?

 [Request a Demo](https://www.quantum-machines.co/request-demo/)
