Classiq / classiq-library

The Classiq Library is the largest collection of quantum algorithms and applications. It is the best way to explore quantum computing software. We welcome community contributions to our Library 🙌
https://platform.classiq.io
MIT License
341 stars 303 forks source link

Is there any documentation on MCX (multi-control-x) minimized depth/ minimized width, maximal width / depth ? #187

Closed mitul3737 closed 3 months ago

mitul3737 commented 3 months ago

Although we have MCX function with minimal depth, there is no documentation to fine tune that.

If that exists, can I get that? If not, can someone guide me to create a documentation on that?

orsa-classiq commented 3 months ago

You can find documentation about optimizing circuit depth here: https://docs.classiq.io/latest/explore/tutorials/classiq_concepts/optimize/optimize/

There is no way to control single function depth, but the entire model. So if you want to get a single MCX with minimal depth, create a circuit with MCX only, and optimize the circuit for depth

mitul3737 commented 3 months ago

You can find documentation about optimizing circuit depth here: https://docs.classiq.io/latest/explore/tutorials/classiq_concepts/optimize/optimize/

There is no way to control single function depth, but the entire model. So if you want to get a single MCX with minimal depth, create a circuit with MCX only, and optimize the circuit for depth

Can you please guide me how can I optimize that for max depth/width, minimum depth/width ?

Thank you

orsa-classiq commented 3 months ago

you can only optimize for minimum depth\width, not maximum. use optimization_parameter='depth' within the constraints