pennylane icon indicating copy to clipboard operation
pennylane copied to clipboard

qutrit mixed state sampling

Open Gabriel-Bottrill opened this issue 1 year ago • 4 comments
trafficstars

Context: Necessary next step in qutrit_mixed device development, allows for sampling a quantum circuit on the mixed state. This will be necessary to simulate sampling a qutrit device.

Description of the Change: Added functionality for sampling a qutrit mixed-state via the new sample_state and measure_with_samples functions.

Benefits: Allows for sampling a qutrit mixed-state, allowing for noisy qutrit simulation sampling

Possible Drawbacks: Abstracting for qubits and more generally qutrits may have added challenges and will require a refactor or copied code code-smell. Methods are not the fastest possible, optimizations can still be made.

Related GitHub Issues: N/A

Gabriel-Bottrill avatar Jan 19 '24 05:01 Gabriel-Bottrill

Current state of sampling PR, I could remove it and make it closer to what is in default.qutrit. I plan to cut it into two to also include expval, var, ... . This however should be a good start to get what is most necessesary while also leaving abstractions to make it easy to include other functionality.

Gabriel-Bottrill avatar Jan 19 '24 05:01 Gabriel-Bottrill

Codecov Report

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

Project coverage is 99.63%. Comparing base (a4f0fff) to head (9ee688a). Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5082      +/-   ##
==========================================
- Coverage   99.63%   99.63%   -0.01%     
==========================================
  Files         400      401       +1     
  Lines       37156    37007     -149     
==========================================
- Hits        37022    36872     -150     
- Misses        134      135       +1     

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

codecov-commenter avatar Feb 08 '24 03:02 codecov-commenter

@albi3ro @glassnotes @mudit2812 @trbromley I cleaned up this PR since measure is close to being merged. Hope you like it!

Gabriel-Bottrill avatar Feb 09 '24 04:02 Gabriel-Bottrill

Measure has been merged, so this is ready for review.

Gabriel-Bottrill avatar Feb 09 '24 23:02 Gabriel-Bottrill

Fixed broken tests. Should be good to go!

Gabriel-Bottrill avatar Mar 08 '24 00:03 Gabriel-Bottrill

Thanks! @mudit2812 do you have the ability to merge in master to the PR branch so that we can do a final round of tests?

trbromley avatar Mar 08 '24 16:03 trbromley

@trbromley I just noticed your message and merged it in :+1:

glassnotes avatar Mar 08 '24 16:03 glassnotes

Thanks! @mudit2812 do you have the ability to merge in master to the PR branch so that we can do a final round of tests?

I will check on the next PR, but I think I should as I'm part of the org that owns the fork.

mudit2812 avatar Mar 08 '24 17:03 mudit2812