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_addare 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
valueandtargetof functionsinplace_addandinplace_xorhave been renamed toexpressionandtarget_varrespectively. Parametersvalueandtargetwill no longer be supported starting on 02/12/24 at the earliest.
Bug Fixes
- Solve a within-apply bug.