Skip to content

Classiq 0.55.0

Compare
Choose a tag to compare
@classiqdor classiqdor released this 31 Oct 08:23
· 69 commits to main since this release

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.