Currently, we use size_t throughout the mapping pass implementation to represent indices. Usually, this is fine as size_t represents the largest representable datatype for indices. However, state-of-the-art quantum computers don't surpass the 2^16=65.536 threshold and hence a smaller datatype might be just fine.
Resolving this issue includes the following steps:
- Implement a configurable index size which defaults to
uint16_t. Template where necessary.
- Benchmark the mapping pass using larger-scale circuits (such as grover). Answer: Is the performance gain noticeable?
- Decide whether the performance gain justifies the "additional implementation overhead".
Currently, we use
size_tthroughout the mapping pass implementation to represent indices. Usually, this is fine assize_trepresents the largest representable datatype for indices. However, state-of-the-art quantum computers don't surpass the2^16=65.536threshold and hence a smaller datatype might be just fine.Resolving this issue includes the following steps:
uint16_t. Template where necessary.