Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix noisy_circuit in mitigation module #884

Merged
merged 4 commits into from
May 10, 2023
Merged

Conversation

MatteoRobbiati
Copy link
Contributor

Fixes the error mitigation execution using qibolab backend.

@codecov
Copy link

codecov bot commented May 5, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (83254d3) 100.00% compared to head (61aae63) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #884   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           48        48           
  Lines         6400      6400           
=========================================
  Hits          6400      6400           
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/qibo/models/error_mitigation.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MatteoRobbiati for spotting and correcting this.

@BrunoLiegiBastonLiegi
Copy link
Contributor

I think there is something wrong in the vnCDR as well. In lines 322-325 we have:

noisy_c = get_noisy_circuit(circuit, level, insertion_gate=insertion_gate)
if noise_model != None and backend.name != "qibolab":
    noisy_c = noise_model.apply(circuit)
circuit_result = backend.execute_circuit(noisy_c, nshots=nshots)

but shouldn't it be noisy_c = noise_model.apply(noisy_c) @AlejandroSopena ?

@AlejandroSopena
Copy link
Contributor

Indeed. Thanks for spotting it @BrunoLiegiBastonLiegi

@AlejandroSopena AlejandroSopena added this pull request to the merge queue May 10, 2023
Merged via the queue into master with commit 700187f May 10, 2023
@scarrazza scarrazza deleted the fix-mitigation branch May 25, 2023 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants