Skip to content

0 55 0

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
)
  1. Support non-equation Boolean expressions as control conditions:
@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))
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.