Open purva-thakre opened 3 months ago
Use this issue to also add functions to the API-doc. https://github.com/unitaryfund/mitiq/discussions/2408#discussioncomment-9776541
Not all functions in mitiq/interface/conversions
will be used by a Mitiq user. Only add functions that will be required to register an interface not already in Mitiq.
For example, atomic_converter
is more useful than accept_qprogram_and_validate
https://mitiq.readthedocs.io/en/stable/guide/zne-4-low-level.html#custom-noise-scaling-methods
I do not think the register_mitiq_converters
function is compatible with how we define SUPPORTED_PROGRAM_TYPES
currently. So, this issue might also require a refactor of register_mitiq_converters
.
The non-mitiq compatible frontend is utilized as a dictionary by register_mitiq_converters
.
https://github.com/unitaryfund/mitiq/blob/20732a0d0f8174c311d90dfa6f94e196051cc7e4/mitiq/interface/conversions.py#L24 https://github.com/unitaryfund/mitiq/blob/20732a0d0f8174c311d90dfa6f94e196051cc7e4/mitiq/interface/conversions.py#L30
SUPPORTED_PROGRAM_TYPES
is a class now and the older definition used a dictionary. I think register_mitiq_converters
is based off of this previous version of SUPPORTED_PROGRAM_TYPES
.
Previously discussed here.
The
Frontends
section of the documentation only discusses circuits that have mitiq supported converters. Digging through the functions inmitiq/interface
, there exists a function to let a user define a converter for an unsupported circuit as long as it follows the format defined inmitiq/typing
.https://github.com/unitaryfund/mitiq/blob/bf82e84410e1805437e15f1d26b0c5be8e8dcb8a/mitiq/interface/conversions.py#L37-L49
We want to describe this process in detail in a subsection of the
Frontends
portion of the documentation.