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

贡献者指南