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
136 stars 36 forks source link

Graph re-writing #449

Open mpharrigan opened 9 months ago

mpharrigan commented 9 months ago

Add functions and rules for re-writing ("transforming") parts of CompositeBloq graphs.

One example optimization is to annihilate adjacent Split and Join bloqs, where applicable.

Other related transformations would involve swapping out different implementations of the same quantum interface.

anurudhp commented 5 months ago

Hey @mpharrigan, I am interested in contributing to this.

Is there already some infra like cirq transformers being worked on for qualtran? If not, I could implement a prototype graph-rewriter, with declarative patterns.