Skip to content

0 77 0

Released on 2025-04-28.

Upgrade Instructions

Enhancements

  1. In Qmod's Python embedding, you can now declare quantum functions with classical parameters of Python builtin types such as int, float, and list. These variables can be used in expressions that require Python values, such as Python for loops and 3rd party library functions, as is shown in the example below. See more on this under the new reference page on Generative Descriptions

    @qfunc
    def rotate(ratio: float, qa: QArray[QBit]):
        for i in range(qa.len):  # 'qa.len' is a Python integer
            PHASE(math.asin(ratio * i), qa[i])  # 'ratio * i' evaluates to a Python float
    

Interface Changes

  1. With Enhancement 1 described above, Python-type parameters supersede classical Qmod-type parameters in generative functions. Hence, the use of the function decorator @qfunc(generative=True) is no longer required. Qmod-type parameters are treated symbolically in Python, and their use in Python expressions is deprecated.

Classiq IDE

  1. Improved UX in Quantum program visualization: collapsing a Quantum operation block will scroll the viewport into the parent operation block position