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

Add client-side validations #1730

Merged
merged 13 commits into from
Jun 18, 2024
Merged

Add client-side validations #1730

merged 13 commits into from
Jun 18, 2024

Conversation

gadial
Copy link
Collaborator

@gadial gadial commented Jun 6, 2024

Summary

This PR adds a new file, utils/validations.py and data validations which can be applied client-side to prevent the user from sending a job that will fail at a later stage.

Details and comments

The added validations:

  1. In Sampler, no classical register of size 0 is passed.
  2. In Sampler, classical register names are valid, non-keyword Python identifiers.
  3. In Estimator, no empty observable array is passed.

@gadial gadial requested a review from kt474 June 6, 2024 06:55
@coveralls
Copy link

coveralls commented Jun 10, 2024

Pull Request Test Coverage Report for Build 9443329778

Details

  • 25 of 25 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 82.407%

Totals Coverage Status
Change from base Build 9402463581: 0.05%
Covered Lines: 6061
Relevant Lines: 7355

💛 - Coveralls

@Qiskit Qiskit deleted a comment from coveralls Jun 13, 2024
@Qiskit Qiskit deleted a comment from coveralls Jun 13, 2024
@kt474 kt474 added the Changelog: New Feature Include in the Added section of the changelog label Jun 18, 2024
@kt474 kt474 added this to the 0.25.0 milestone Jun 18, 2024
@coveralls
Copy link

coveralls commented Jun 18, 2024

Pull Request Test Coverage Report for Build 9569004723

Details

  • 49 of 50 (98.0%) changed or added relevant lines in 10 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 82.0%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit_ibm_runtime/utils/validations.py 37 38 97.37%
Totals Coverage Status
Change from base Build 9568868060: 0.06%
Covered Lines: 6077
Relevant Lines: 7411

💛 - Coveralls

@kt474 kt474 merged commit dcc0d1f into Qiskit:main Jun 18, 2024
18 checks passed
@gadial gadial deleted the client_side_validations branch June 19, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the Added section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants