jsqubits
jsqubits copied to clipboard
Document QState.each()
QState.each() is likely to be useful to anyone wanting to add new operators and should be documented.
The each() method needs improvement. The StateWithAmplitude class is not only badly named, but also confusing. Probably shouldn't expose the index field as it cannot be used as a parameter to the argument() method.