Skip to content

Releases: Classiq/classiq-library

Classiq 0.56.0

04 Nov 14:35
Compare
Choose a tag to compare

Released on 2024-10-31.

Upgrade Instructions

New Features

  1. Add an optional else block to the control statement.

Bug Fixes

  1. Fix Pauli feature map circuit visualization.
  2. Add missing len property to QConstants of type CArray (Qmod/Python).

Classiq 0.55.0

31 Oct 08:23
Compare
Choose a tag to compare

Released on 2024-10-28.

Upgrade Instructions

Enhancements

  1. Qmod/Python: Functions assign, assign_amplitude, inplace_xor, and
    inplace_add are equivalent to the operators |=, *=, ^=, and +=
    respectively except that they can be used in operands (Python lambda
    functions):

    within(
        lambda: assign(x, y),  # y |= x
        lambda: inplace_xor(y, z),  # z ^= y
    )
  2. Support non-equation Boolean expressions as control conditions:

=== "SDK"

[comment]: DO_NOT_TEST

``` python
@qfunc
def main(a: Output[QBit], b: Output[QBit], res: Output[QBit]) -> None:
    allocate(1, a)
    allocate(1, b)
    allocate(1, res)
    control(a & b, lambda: X(res))
```

=== "Native"

```
qfunc main(output a: qbit, output b: qbit, output res: qbit) {
  allocate(1, a);
  allocate(1, b);
  allocate(1, res);
  control (a & b) {
    X(res);
  }
}
```

Interface Changes

  1. Parameters value and target of functions inplace_add and inplace_xor
    have been renamed to expression and target_var respectively.
    Parameters value and target will no longer be supported starting on
    02/12/24 at the earliest.

Bug Fixes

  1. Solve a within-apply bug.

Classiq 0.54.0

31 Oct 08:23
Compare
Choose a tag to compare

Released on 2024-10-21.

Upgrade Instructions

Deprecations

  1. Python 3.8 is no longer supported in the Python SDK. The minimum supported
    version is now Python 3.9.

Enhancements

  1. Optimize in-place XOR variable assignments (x ^= y).
    (The implementation no longer uses auxiliary qubits.)
  2. Improve error messages in CArray (array) parameter declaration.
  3. Support array subscripts and struct field access on the left-hand side of
    in-place arithmetic assignments (qbv[0] ^= 1 and my_Struct.field += 2.5).
  4. Optimize the controlled version of QFT arithmetic implementations by skipping
    controlling the QFT and QFT dagger.

Classiq 0.53.0

31 Oct 08:23
Compare
Choose a tag to compare

Released on 2024-10-14.

Upgrade Instructions

Enhancements

  1. Introducing generative functions
    to the Python SDK. Generative functions are @qfuncs that support Python
    control flow, integration with third-party libraries, and debugging.

  2. Execution using IBM devices is available again.

  3. New method estimation_cost in ExecutionSession evaluates a quantum
    circuit given a classical cost function.

  4. A new += operator performs
    in-place addition
    of quantum numerics.
    Example: z += x ** 2 - 0.5 * y

  5. The state of SampledState supports dot-notation for field access when
    representing a quantum struct:

    struct_sample = sample.state["my_qstruct"]
    field_sample = struct_sample.my_field

Library Additions

  1. Add two new functions for encoding classical data, encode_in_angle and encode_on_bloch. See notebook.

  2. Add a new example for hybrid classical-quantum neural network. See notebook.

Interface Changes

  1. Parameter control of built-in functions such as CX has been renamed to
    ctrl. Parameter control will no longer be supported starting on 4/11/24
    at the earliest.

Bug Fixes

  1. Fix classical array slicing in the SDK (my_list[1:3][0]).
  2. Fix synthesis of arithmetic operations nested in a within-apply statement
    when machine_precision is set.
  3. Fix in-place arithmetic operations (^=/+=) when the value on the
    right-hand side is a signed variable that is not aligned with the target
    variable.

Classiq 0.52.0

31 Oct 08:21
Compare
Choose a tag to compare

Released on 2024-10-02.

Upgrade Instructions

Enhancements

  1. Optimize synthesis of variable and constant assignments (x ^= y, x += 3).
  2. The behavior of synthesis with debug_mode
    set to False has been changed, such that synthesis process is up to 50% faster. However,
    the resulting visualized quantum program may lose much of its hierarchical structure.
    Note that the default value for debug_mode is still True, and this mode's behavior remains unchanged.
  3. The maximum number of shots in a single execution on Nvidia simulators has
    been increased to 1,000,000.

Bug Fixes

  1. Improve circuit width estimation when machine_precision is set.
  2. Removing the non-gate-based devices from the available AWS Bracket devices.
  3. Fix n ^= 1 assignments where n has a single qubit
    (used to raise an exception).

Notice

  • With the release of this version (0.52.0),
    execution with older SDK versions may result in errors or unexpected behavior.
    To ensure proper execution of your quantum programs via the SDK,
    please upgrade to the latest version (See instructions guide above).

  • The Pydantic package dependency has been upgraded from version 1 to version 2.
    If you are using an older version of Pydantic in the same environment as our SDK,
    this may lead to compatibility issues.
    Note that installing or upgrading the SDK will also update your Pydantic version to V2.
    It is recommended to verify compatibility across your environment.

Classiq 0.51.0

29 Sep 13:20
Compare
Choose a tag to compare

Released on 2024-09-29.

Upgrade Instructions

Notice

  • With the release of version 0.52 (scheduled for the week of 06-12.10.2024),
    execution with older SDK versions might result in errors or unexpected behavior.
    In order to make sure executions of your quantum programs via the SDK work properly
    upgrade your SDK to the latest version (See instructions guide above).

Enhancements

  1. Improve qubit reuse in arithmetic operations when machine_precision is set.
  2. Improve error messages when executing circuits on Amazon Braket.
  3. Improve error messages when executing the VQE primitive.
  4. Support constant assignments: x |= 3, x ^= 3, and x += 3.

Bug Fixes

  1. Fix in-place XOR assignments (^=) of 1-qubit expressions into multi-qubit
    variables (used to raise an error).

SDK

  1. Add a new function, quantum_program_from_qasm, to convert a QASM string into a Quantum Program.

Classiq 0.50.0

25 Sep 11:42
Compare
Choose a tag to compare

Released on 2024-09-23.

Upgrade Instructions

Notice

  • With the release of version 0.52 (scheduled for the week of 06-12.10.2024),
    execution with older SDK versions might result in errors or unexpected behavior.
    In order to make sure executions of your quantum programs via the SDK work properly
    upgrade your SDK to the latest version (See instructions guide above).

Classiq 0.49.0

23 Sep 08:42
Compare
Choose a tag to compare

Released on 2024-09-16.

Upgrade Instructions

Notice

  • With the release of version 0.52 (scheduled for the week of 06-12.10.2024),
    execution with older SDK versions might result in errors or unexpected behavior.
    In order to make sure executions of your quantum programs via the SDK work properly
    upgrade your SDK to the latest version (See instructions guide above).

Bug Fixes

  1. Raise indicative error when circuit cannot be visualized.
  2. Fixed synthesis of arithmetic operations nested in a within-apply statement
    when machine_precision is set.

Classiq 0.48.0

23 Sep 08:41
Compare
Choose a tag to compare

Released on 2024-09-10.

Upgrade Instructions

Enhancements

  1. Improved error messages.
  2. Added SIGNED and UNSIGNED built-in constants to improve readability of
    QNum types. SDK: QNum[4, SIGNED, 1]. Native: qnum<4, SIGNED, 1>.
  3. QNum types can specify just the size property. SDK: QNum[4] and
    QNum("n", 4). Native: qnum<4>. Such types are unsigned
    (is_signed=False) integers (fraction_digits=0) by default.
  4. Execution on remote providers is no longer subject to any time limit when using ExecutionSession
    or executing models without classical execution code. Note: simulation on Classiq backends is still subject to time limit.
  5. In-place add operations (inplace_add) now support signed variables.

Bug Fixes

  1. Fixed an operand-related bug. Might occur when calling a function recursively
    in one of its operands (for example: foo(lambda: foo(...))).
  2. Fixed an expression-related bug. Might occur when using the same variable
    in multiple expressions.
  3. Fixed in-place XOR operations (^= / inplace_xor) in the presence of
    signed variables. The sign variable is now interpreted as part of the
    significand without special treatment.
  4. Fixed synthesis of arithmetic operations nested in a within-apply statement.

Interface Changes

  1. SDK: Deprecated parameter names in built-in operations were removed.
    • control(ctrl=..., operand=...) => control(ctrl=..., stmt_block=...)
    • within_apply(compute=..., action=...) => within_apply(within=..., apply=...)
    • power(power=..., operand=...) => power(exponent=..., stmt_block=...)
    • invert(operand=) => invert(stmt_block=...)

Library Additions

  1. Added a new notebook for solving the Differential equation using the HHL Algorithm, to simulate war games.

Classiq 0.47.0

23 Sep 08:36
Compare
Choose a tag to compare

Upgrade Instructions

Enhancements

  1. Cancelling an execution job will now result in cancellation of any ongoing jobs sent to the provider during the execution. For more information, see Cancellation.

Library and Documentation

  1. A new tutorial on the Oblivious Amplitude Amplification algorithm was added.

SDK

  1. The Classiq SDK now supports Python 3.12.