quantumlib/Qualtran

Reorganize arithmetic bloqs

Opened this issue · 0 comments

Arithmetic bloqs have grown a lot since the last reorg, and it's becoming more difficult to locate a certain bloq.

A few examples of overly long files:

  • multiplication.py: contains PlusEqualProduct, Square, SumOfSquares, Product, ScaleIntByReal, MultiplyTwoReals, SquareRealNumber, InvertRealNumber.

There are also bloqs of varying abstraction levels, like basic operations (add, sub, mul, bitwise etc), and higher level ones (sorting, permutation).

My suggestions:

  • Use sub folders to organize each type of operation. One possible reference for grouping and naming conventions: c++.
  • Try to stick to the one-bloq-per-file convention as much as possible.
  • Perhaps move sorting and permutation to a different folder?

Open to suggestions!