Skip to content

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 and others added 2 commits February 5, 2025 18:30
@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
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
* Parameterize LinearDict

* Add protocol handlers

* fix protocol handlers

* fix protocol handlers, add test

* format

* tests

* Y, Z gates, parameterize test

* mypy

* Revert changes to Scalar, and just use TParamValComplex everywhere. Add tests.

* Parameterize LinearCombinationOfGates

* tests

* tests

* tests

* tests

* test

* Update cirq-core/cirq/ops/raw_types.py

Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>

---------

Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>
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