microsoft/QuantumKatas

Fix math mode rendering in browser

開放

#809 建立於 2022年7月28日

 (5 則留言) (0 個反應) (0 位負責人)Jupyter Notebook (1,242 個分叉)auto 404
good first issue

倉庫指標

星標
 (4,904 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Hi, I've noticed that equations written in math mode are not always rendered correctly in a browser. Fixing this would make the learning experience better for people that use separate devices for reading and solving katas.

Example of the problem

Equations written in consecutive lines are rendered as one-line equation.

In the SingleQubitGate kata under the "Matrix Representation" section the equations for $X|0\rangle$ and $X|1\rangle$ are displayed on one line instead of two. The problem is also visible in Complex Arithmetic kata under the "Imaginary numbers" section. There three equations are displayed on one line.

I can fix this by dividing the equations into multiple math sections instead of using \\ to generate a new line. For example $$eq1 \\ eq2$$ would be transformed into $$eq1$$ $$eq2$$. Here you can view example of my fix.

Technical details

I've verified that this rendering problem exists on Edge, Firefox and Chrome.

Changing the color of an equation is also broken in the browser (See: SingleQubitGates -> Ket-bra decomposition).


If you don't have any objections to this fix, I can search and fix the rendering problems also in other notebooks. If I do that it would be nice to know which katas are equation-heavy, so if you know please share.


The list of katas/tutorials/workbooks to review and fix, following the learning path. I expect most of the issues will be in tutorials and workbooks, since they have more formulas compared to the katas themselves.

  • Quantum Computing Concepts: Qubits and Gates, minus Superposition (@remilvus)
  • Superposition
  • Quantum Computing Concepts: Measurements
  • Visualization tools
  • Simple algorithms
  • Quantum Oracles and Simple Oracle Algorithms
  • Grover's search algorithm
  • QFT & QPE
  • Entanglement games
  • Reversible computing
  • Miscellaneous

貢獻者指南