-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Context:** Currently, the sample_state helper function accepts a state vector, turns it into probabilities, and then samples it. This task is to break out the code for sample_probs from this function. By breaking this code into it's own helper function, we can reuse it for a "sample density matrix" implementation. **Description of the Change:** - [x] Separate `devices.qubit.sampling.sample_probs` from `sample_state` - [x] Separate `devices.qubit.sampling.sample_probs_jax` from `_sample_state_jax` - [x] similar but for qutrit mixed - [x] similar but for qutrit mixed **Benefits:** Better modularization; disentanglement Future usage in new devices **Possible Drawbacks:** **Related GitHub Issues:** **Related ShortCut Stories:** [sc-73317] --------- Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
- Loading branch information
1 parent
f54e053
commit 3dd186f
Showing
7 changed files
with
398 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.