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
165 stars 40 forks source link

Add symbolic support to Bloqs that expect control values as `cvs: Tuple[int, ...]` #786

Open tanujkhattar opened 6 months ago

tanujkhattar commented 6 months ago

Many bloqs (like MultiAnd, MultiControlPauli etc.) currently expect a control values object as a Tuple[int, ...]. This has a consequence that we cannot instantiate these objects symbolically.

We should replace cvs: Tuple[int, ...] with CtrlSpec object that can be instantiated symbolically as well.

mpharrigan commented 6 months ago

Would we want some sort of CtrlSpec that takes a parameter n for the number of controls and doesn't fully specify what the control values actually are? Usually during costing the difference between a positive and negative control is negligible

tanujkhattar commented 6 months ago

Yes, that's the idea.

mpharrigan commented 6 months ago

xref #716

sounds useful to me

mpharrigan commented 4 months ago

The newly-added Shaped symbolic utility #867 would be good here

mpharrigan commented 3 weeks ago

Is there a list of high priority bloqs that need this