Strilanc / Quirk

A drag-and-drop quantum circuit simulator that runs in your browser. A toy for exploring and understanding small quantum circuits.

Home Page:http://algassert.com/quirk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minor UI issue in recent Firefox (starting at about Firefox 115)

cduck opened this issue · comments

This is a bug in Firefox, not Quirk but you may want to track the issue here. The horizontal qubit and measurement wires in the circuit diagram display are rendered as slight zig-zag lines instead of continuous, perfectly horizontal lines.

firefox-canvas-bug

See https://bugzilla.mozilla.org/show_bug.cgi?id=1847681 for more details. At minimum this affects Firefox versions 115 through 116 (and 118 nightly) but it does not affect 109 (or earlier).


Quick-and-dirty fix that corrects the visual issue but breaks all other browsers (and the sampling gate icons):
src/draw/Painter.js:451

-         this.ctx.moveTo(x1, y1);
+         this.ctx.moveTo(x1, y1+0.5);

Thanks for reporting this to Mozilla. I will sit back and watch.