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

Sequence sampler component #342

Closed
lvignoli opened this issue Mar 4, 2022 · 2 comments · Fixed by #345
Closed

Sequence sampler component #342

lvignoli opened this issue Mar 4, 2022 · 2 comments · Fixed by #345
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@lvignoli
Copy link
Collaborator

lvignoli commented Mar 4, 2022

Samples of Sequence instances are currently computed in place in the Simulation class and in the _seq_drawer function as well. This gives two pieces of code dedicated to the same task, which is bad.

To 1) fix this 2) ease the construction of the samples dictionary and 3) decouple its use from its construction, it would be very beneficial to implement an independent Sequence sampler component.
Se the original proposal in PR #337.

The sampler will receive a Sequence instance as well as the strategies to sample it: noise sources, qubits masked by an SLM, modulation effects from AOM/EOM. These strategies must play well with each others: they should be easy to add, remove or update independently.

@lvignoli lvignoli self-assigned this Mar 4, 2022
@lvignoli lvignoli added the enhancement New feature or request label Mar 4, 2022
@HGSilveri
Copy link
Collaborator

A couple more concrete ideas to consider here:

  • The SequenceSampler (maybe we should call it this, I'll just adopt the name for now) should be initialised with just the Sequence instance, and then be capable of returning the samples according to the parameters given to its method(s)
  • I don't know yet if it makes more sense to have a single public method to return the samples (where everything is specified in the arguments or in some configuration parameters) or to have multiple ones. If we are going to distinguish between the sampling for _seq_drawer, then that one would fit well in a separate method, but I don't know if much more splitting makes sense.

@HGSilveri HGSilveri added this to the v0.6 Release milestone Mar 7, 2022
@lvignoli
Copy link
Collaborator Author

@HGSilveri, I have opened PR #345 as a proposal implementation.

I wrote a different design that is not class-based, let me know what you think of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants