Skip to content

v8.1.20 - PennyLane wire-remap fix, depolarizing noise channel fix

Choose a tag to compare

@tatopenn-cell tatopenn-cell released this 21 Jul 14:48

Both bugs found via independent fuzz testing on Colab, verified directly before fixing.

Fixed

  • from_pennylane/run_pennylane_circuit silently renumbered qubits whenever wires weren't touched in ascending order — both qml.to_openqasm and the older tape.to_openqasm() number exported QASM qubits by first-touch order, not actual wire index. Fuzz test (20 random circuits, 4 wires touched in random order): 9/20 matched PennyLane's own result before this fix, 20/20 after. Fixed by passing an explicit wires= argument to force true wire order into the export.
  • NoiseModel.apply_to_sv's depolarizing channel (and combined's depolarizing sub-channel) picked X/Y/Z using thresholds p/3, 2p/3 against a draw uniform on the full [0,1) range, instead of the fixed 1/3, 2/3 — skewed every depolarizing circuit heavily toward Z regardless of p (verified: at p=0.3, P(Z|fire)=80% instead of the documented 33.3%, confirmed both via isolated branch-logic trace and full statevector simulation).

Tracked, not fixed here

  • Unrecognized gate names are silently dropped everywhere in the simulator instead of raising — a breaking-change decision, tracked in #4.

PyPI: https://pypi.org/project/dense-evolution/8.1.20/