q.js
q.js copied to clipboard
Docs. Matrix. Add descriptions to constants.
Currently the Matrix
documentation shows the code definition of each constant as well as the mathematical representation. But it does not explain what that constant is useful for. For example, what is the HADAMARD
useful for? Write descriptions for all.
Update: This now really applies too Gate
documentation rather than Matrix
. See https://quantumjavascript.app/Gate.html#Operations_with_2_%C3%97_2_matrices for the list.
All of these definitions need updates in general to reflect additions to how Gates are now defined—and how controlled gates are no longer defined by Gate
but implicitly by the Circuit
rendering routine. The short win is writing good brief descriptions of what the existing gates do conceptually—rather than just their mathematical definitions. The longer win is also solving how we want to be able to group several operations in to a compound operation and implementing that in code as well as describing that in the docs.