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

[Feature, Backend] Allow readout errors to be applied on computed probability vectors directly without sampling #369

Closed
rajaiitp opened this issue Mar 19, 2024 · 6 comments
Assignees
Labels
backends Improving the backends feature New feature or request

Comments

@rajaiitp
Copy link
Collaborator

Requesting for readout errors to be applied without sampling

tensordot can be used to apply readout errors if pytorch is computing the probability vector without directly using statevector for computing expectation values (not sure if it makes it slower, but is only usable for diagonal observables)

This would help with training models faster using AD while keeping the effects of readout errors. Something which the usecase people would require sooner or later for robustness studies.

@RolandMacDoland
Copy link
Collaborator

Hey @rajaiitp thanks for this. Could you please clarify details here ?

@rajaiitp rajaiitp changed the title Allow readout errors to be applied on the backend for differentiability Allow readout errors to be applied on state vectors directly Mar 26, 2024
@rajaiitp rajaiitp changed the title Allow readout errors to be applied on state vectors directly Allow readout errors to be applied on computed probability vectors directly without sampling Mar 26, 2024
@rajaiitp
Copy link
Collaborator Author

From what i see, the add_noise method in readout.py allows for noise to implemented at the level of bitstrings rather than probability vectors. This means that sampling is happen before readout errors applied.

Adjoint differentiation isnt compatible with sampling, i understand. The goto method is thus PSR if one wants to implement readout errors. It would be way convenient if we can bypass sampling and apply readout errors directly on the probability vector instead.

I like to think that the best way to do is generate transformed probability vectors affected by readout matrix directly at the level of backend (instead of exact non noisy state vectors), so that diagonal observables can be measured with it

@RolandMacDoland
Copy link
Collaborator

RolandMacDoland commented Apr 5, 2024

@gvelikova Could you please have a go at what this entails exactly ? That'd be helpful. Thanks. This feels very much a PyQTorch thing.

@RolandMacDoland RolandMacDoland added the feature New feature or request label Apr 5, 2024
@RolandMacDoland RolandMacDoland changed the title Allow readout errors to be applied on computed probability vectors directly without sampling [Feature] Allow readout errors to be applied on computed probability vectors directly without sampling Apr 5, 2024
@RolandMacDoland RolandMacDoland added the backends Improving the backends label Apr 5, 2024
@RolandMacDoland RolandMacDoland changed the title [Feature] Allow readout errors to be applied on computed probability vectors directly without sampling [Feature, Backend] Allow readout errors to be applied on computed probability vectors directly without sampling Apr 5, 2024
@RolandMacDoland
Copy link
Collaborator

@rajaiitp @gvelikova It would be great to start on this.

@rajaiitp
Copy link
Collaborator Author

Missed it, I will start working on this soon

@mlahariya
Copy link
Collaborator

Closing as not relevant anymore.

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

No branches or pull requests

5 participants