catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

Every HybridOp should implement `map_wires`

Open erick-xanadu opened this issue 1 year ago • 3 comments

Or alternatively, a base class should implement map_wires.

erick-xanadu avatar Feb 27 '24 19:02 erick-xanadu

I do wonder, why should they implement this method (in what context does it come up or cause issues)?

dime10 avatar Jun 24 '24 18:06 dime10

Well, I had this test here, but it got deleted :sweat_smile: https://github.com/PennyLaneAI/catalyst/pull/555/files

The issue came from a template or transform that uses map_wires in operations. If HybridCtrl didn't implement it, then it would fail. I believe with the recent changes where HybridCtrl inherits from another control it might be solved, but I am not a 100% sure.

erick-xanadu avatar Jun 24 '24 18:06 erick-xanadu

Ah thanks, that makes sense! I don't think it's fully solved yet.

dime10 avatar Jun 24 '24 18:06 dime10