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

Support multi-shot exact simulation backends using Sampler from cuTensorNet #121

Closed
PabloAndresCQ opened this issue Jun 3, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@PabloAndresCQ
Copy link
Collaborator

PabloAndresCQ commented Jun 3, 2024

Current backend implementation does not support multi-shot statistics. Instead, it requires the user to do each shot separately, incurring in the contraction cost for each shot.

When the user is only concern about the measurement statistics on a subset of the qubits, obtaining the reduced density matrix of the state on said qubits allows for efficient multi-shots (assuming few qubits are measured), and only incur in the cost of contraction once. CuTensorNet's high-level API provides a create_marginal method to obtain said reduced density matrix. We should make use of this to provide a multi-shot backend.

@PabloAndresCQ PabloAndresCQ added the enhancement New feature or request label Jun 3, 2024
@PabloAndresCQ PabloAndresCQ self-assigned this Jun 3, 2024
@PabloAndresCQ PabloAndresCQ changed the title Support multi-shot exact simulation backends using Marginal and Sampler from cuTensorNet Support multi-shot exact simulation backends using Sampler from cuTensorNet Jun 24, 2024
PabloAndresCQ added a commit that referenced this issue Jul 4, 2024
# Description

- Refactors `CuTensorNetBackend` into `CuTensorNetStateBackend` which
now uses the new `GeneralState`.
- Introduces a new `CuTensorNetShotsBackend` for shot-based simulation.

# Related issues

Completes #121.

# Checklist

- [x] I have run the tests on a device with GPUs.
- [x] I have performed a self-review of my code.
- [x] I have commented hard-to-understand parts of my code.
- [x] I have made corresponding changes to the public API documentation.
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] I have updated the changelog with any user-facing changes.
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

No branches or pull requests

1 participant