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 options #146

Merged
merged 6 commits into from
Jul 31, 2024
Merged

[feature] Backend options #146

merged 6 commits into from
Jul 31, 2024

Conversation

PabloAndresCQ
Copy link
Collaborator

@PabloAndresCQ PabloAndresCQ commented Jul 30, 2024

Description

  • Solves the issue below, allowing users to provide attributes from the cuTensorNet enums.
  • Adds a check in sample from GeneralState to raise an exception if the circuit has no measurements.
  • Small changes:
    • Default scratch_fraction is now 0.75
    • Set the default logging level of GeneralState to WARNING (less verbose than INFO)

Related issues

Solves #144

Checklist

  • I have run the tests on a device with GPUs.
  • I have performed a self-review of my code.
  • I have commented hard-to-understand parts of my code.
  • I have made corresponding changes to the public API documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the changelog with any user-facing changes.

@PabloAndresCQ PabloAndresCQ marked this pull request as ready for review July 30, 2024 16:49
Copy link
Collaborator

@jake-arkinstall jake-arkinstall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Only snag is that the rename of the parameter attributes to cutn_attributes is a breaking change for any code that uses e.g. x.sample(n_shots=..., attributes=...). As long as this is acceptable then merge ahead.

@PabloAndresCQ
Copy link
Collaborator Author

Yeah, good point, about the breaking change. TBH it's not even that necessary, I did that because I intended to have cutn_attributes as an argument to the backends (and I just attributes felt too ambiguous), but that's not the case in the final approach I took. For GeneralState, leaving it as attributes is alright, so I'm going to roll it back.

@PabloAndresCQ PabloAndresCQ merged commit c210d6b into main Jul 31, 2024
7 checks passed
@PabloAndresCQ PabloAndresCQ deleted the feature/backend_options branch July 31, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants