0 55 0
Released on 2024-10-28.
Upgrade Instructions
- Python SDK
- The IDE upgrades automatically.
Enhancements
- Qmod/Python: Functions
assign
,assign_amplitude
,inplace_xor
, andinplace_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
)
- 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
- Parameters
value
andtarget
of functionsinplace_add
andinplace_xor
have been renamed toexpression
andtarget_var
respectively. Parametersvalue
andtarget
will no longer be supported starting on 02/12/24 at the earliest.
Bug Fixes
- Solve a within-apply bug.