Closed awinick closed 8 months ago
Hi Adam and thanks for posting this!
I just added a basic implementation of the UnitaryGate
class as you suggested. Let me know if it makes sense to you.
Also, could you please provide an example about a specific use-case of this feature? It could be really helpful for me to better understand your needs and possibly further improve the current implementation ;)
EDIT: fixed in faf4edb
Thanks for adding this so quickly - exactly what I had in mind!
I've been working on modifying ConsolidateBlocks so it can be applied directly to parametric circuits. During circuit transpilation, a situation can arise where I need to consolidate a unitary and some parametric gates.
I have a class that uses qiskit-sim under the hood to store and operate on symbolic consolidated blocks and assign parameters when desired. Your package greatly simplified the necessary work, but without support for unitary gates, it failed for some circuits.
I can't be too specific, but I am happy to try and answer any more questions you might have. I'll also let you know if I find any other features that might be useful.
Oh ok cool! Thank you very much for the feedback, I'm glad to hear that you found the package useful. And yes, don't hesitate to let me know if you have in mind any other feature that qiskit-symb
should offer.
I close this issue as completed now but feel free to reopen it if you need something more related to the UnitaryGate
support.
Unitary gates help represent arbitrary unparameterized blocks acting on some number of qubits. They are particularly useful during circuit transpilation passes. It is straightforward to support them in qiskit-symb, and I've verified it works as expected. Here is the relevant gate class:
P.S. Awesome work with everything Simone! Your package has been very helpful and easy to use!