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

Allow symbolic scalars in linear combinations #7030

Merged
merged 18 commits into from
Feb 6, 2025

Conversation

daxfohl
Copy link
Collaborator

@daxfohl daxfohl commented Feb 4, 2025

Followup to #7003, allowing symbolic scalars in LinearCombinationOfGates and LinearCombinationOfOps.

Applies to #1617.

@daxfohl daxfohl requested review from vtomole and a team as code owners February 4, 2025 06:55
@CirqBot CirqBot added the size: M 50< lines changed <250 label Feb 4, 2025
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.88%. Comparing base (0e50a8c) to head (6e31825).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cirq-core/cirq/linalg/operator_spaces.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7030      +/-   ##
==========================================
- Coverage   97.89%   97.88%   -0.01%     
==========================================
  Files        1085     1085              
  Lines       95188    95199      +11     
==========================================
+ Hits        93181    93190       +9     
- Misses       2007     2009       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@daxfohl
Copy link
Collaborator Author

daxfohl commented Feb 4, 2025

@pavoljuhas is there a workaround for the coverage check on

if typechecking:
    import cirq```?

Copy link
Collaborator

@pavoljuhas pavoljuhas left a comment

Choose a reason for hiding this comment

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

LGTM with a tiny adjustment to typing. I will take a look at the coverage noise separately.
Thanks for adding this!

@pavoljuhas
Copy link
Collaborator

@pavoljuhas is there a workaround for the coverage check on

if typechecking:
    import cirq```?

This gets fixed by moving coverage configuration to pyproject.toml - #7038 (comment)

@daxfohl daxfohl added this pull request to the merge queue Feb 6, 2025
Merged via the queue into quantumlib:main with commit dee2c5c Feb 6, 2025
37 of 38 checks passed
@daxfohl daxfohl deleted the param-linear-combos branch February 6, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants