quantumlib / Qualtran

Qᴜᴀʟᴛʀᴀɴ is a Python library for expressing and analyzing Fault Tolerant Quantum algorithms.
https://qualtran.readthedocs.io/en/latest/
Apache License 2.0
132 stars 35 forks source link

Should we change StatePreparationViaRotations to (optionally?) use SelectSwapQROM? #1021

Open wjhuggins opened 1 month ago

wjhuggins commented 1 month ago

I'm not sure what the best way to do this is, because there are a lot of design choices one could make and it might be hard to have sensible defaults, but I found myself wanting a version of StatePreparationViaRotations that uses SelectSwapQROM instead of QROM.

Some random thoughts about what makes this tricky:

fdmalone commented 1 month ago

Two thoughts:

  1. In general it is an open problem of how we can modify decompositions to replace bloqs which perform the same operation and have the same signature.
  2. For QROM vs SelectSwap I imagine there are cases where some sensible factory method / builder could be cooked up which would perhaps decide on the optimal method to use given some considerations (ancilla count etc..), and would then potentially use 1.