qiboteam / qibolab

Quantum hardware module and drivers for Qibo.
https://qibo.science
Apache License 2.0
41 stars 12 forks source link

Execute circuits from QASM strings #765

Closed BrunoLiegiBastonLiegi closed 7 months ago

BrunoLiegiBastonLiegi commented 7 months ago

This implements a trivial function to directly execute circuits starting from a QASM string.

Checklist:

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (92f35df) 62.45% compared to head (c035b25) 62.48%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #765 +/- ## ========================================== + Coverage 62.45% 62.48% +0.03% ========================================== Files 47 47 Lines 5867 5872 +5 ========================================== + Hits 3664 3669 +5 Misses 2203 2203 ``` | [Flag](https://app.codecov.io/gh/qiboteam/qibolab/pull/765/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/qiboteam/qibolab/pull/765/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | `62.48% <100.00%> (+0.03%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

BrunoLiegiBastonLiegi commented 7 months ago

Should I add a small example in the docs about this? Where would it be better to have it?

alecandido commented 7 months ago

Should I add a small example in the docs about this? Where would it be better to have it?

About this, I'm not sure. Something in the docs would not hurt, but I guess this would be mainly used through other packages (I don't believe that users, i.e. people executing algorithms, are expected to interact much with Qibolab...).

@scarrazza?

scarrazza commented 7 months ago

Thanks @BrunoLiegiBastonLiegi. Yes, I think we should include this function in the API docs and create an entry in the tutorials, say "Circuit execution from QASM" with an example.

scarrazza commented 7 months ago

@stavros11, indeed, I have sent the message by mistake while talking to Andrea.