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

Delegate CircuitResult.probabilities() to the backend #618

Merged
merged 2 commits into from
Jul 13, 2022

Conversation

stavros11
Copy link
Member

@stavros11 stavros11 commented Jul 12, 2022

Moves the implementation of CircuitResult.probabilities() to the backend, to allow having alternative implementations of the probability calculation on hardware backends. Unlike simulation, hardware backends do not rely on the state vector tensor to calculate measurement probabilities.

Similar refactoring may be required for CircuitResult.samples() and CircuitResult.frequencies() depending on hardware needs.

@stavros11 stavros11 requested a review from scarrazza July 12, 2022 12:33
@codecov
Copy link

codecov bot commented Jul 12, 2022

Codecov Report

Merging #618 (487c8fb) into refqibolab (a7257e3) will not change coverage.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##           refqibolab      #618   +/-   ##
============================================
  Coverage      100.00%   100.00%           
============================================
  Files              77        77           
  Lines           10345     10348    +3     
============================================
+ Hits            10345     10348    +3     
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/backends/abstract.py 100.00% <100.00%> (ø)
src/qibo/backends/numpy.py 100.00% <100.00%> (ø)
src/qibo/states.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7257e3...487c8fb. Read the comment docs.

@scarrazza scarrazza changed the base branch from refqibolab to master July 13, 2022 09:21
@scarrazza scarrazza merged commit 3cfb6f8 into master Jul 13, 2022
@stavros11 stavros11 deleted the circuitresult branch July 15, 2022 09:10
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.

2 participants