Qiskit Bug Silently Drops Quantum Gate Operations Due to Rust Modulo Sign Error
A developer building a linter for quantum chemistry setups discovered that Qiskit's CommutativeCancellation transpiler pass was silently discarding valid single-qubit gate sequences instead of simplifying them correctly. The bug caused circuits combining sx and sxdg gates to produce an empty operation set with no error or warning when run through Qiskit 2.5.0. After filing a detailed issue on GitHub, a core Qiskit maintainer identified the true root cause in the Rust backend: the pass correctly calculated rotation angles but failed to synthesize gates when the combined X rotation was a negative odd multiple of pi/2. The underlying fault traced to Rust's modulo operator preserving the dividend's sign, causing a negative loop count and skipping gate insertion entirely. A fix was already in progress via pull request by the time the root cause was pinpointed in the codebase.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in