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

Update device toml specs to schema 2 #642

Merged
merged 51 commits into from
May 9, 2024
Merged

Update device toml specs to schema 2 #642

merged 51 commits into from
May 9, 2024

Conversation

sergei-mironov
Copy link
Contributor

@sergei-mironov sergei-mironov commented Mar 13, 2024

Context: Catalyst supports quantum device specification in a new format in addition to the existing one, supporting per-gate parameters.

Description of the Change: By this PR we update existing device specifications to the new format

Benefits: Per-gate properties allow device authors to query PL for certain behavior on programs (decomposition, adding quantum control, validation)

Possible Drawbacks:

Related GitHub Issues:

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit .github/CHANGELOG.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

Copy link
Member

@mlxd mlxd left a comment

Choose a reason for hiding this comment

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

Hey @grwlf
Just a few quick questions

@mlxd mlxd requested a review from a team March 19, 2024 20:21
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.20%. Comparing base (cde3016) to head (022d05a).
Report is 4 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #642       +/-   ##
===========================================
- Coverage   98.13%   57.20%   -40.93%     
===========================================
  Files         193       16      -177     
  Lines       25443     1832    -23611     
===========================================
- Hits        24968     1048    -23920     
- Misses        475      784      +309     

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

Copy link
Contributor

@vincentmr vincentmr left a comment

Choose a reason for hiding this comment

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

I just have one question, but then ready to approve.

@sergei-mironov sergei-mironov requested a review from dime10 May 3, 2024 12:51
@sergei-mironov
Copy link
Contributor Author

sergei-mironov commented May 3, 2024

I have run the lightning and kokkos cross-checks using the following components:

As far as I see, after a minor Catalyst fixup (the PR is linked above), all checks pass.

@sergei-mironov sergei-mironov requested a review from dime10 May 6, 2024 15:44
Copy link
Contributor

@dime10 dime10 left a comment

Choose a reason for hiding this comment

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

Good to go 👍

Copy link
Member

@maliasadi maliasadi left a comment

Choose a reason for hiding this comment

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

Thanks 🙌

Don't forget to update the changelog before merge.

@maliasadi maliasadi added ci:build_wheels Activate wheel building. and removed ci:build_wheels Activate wheel building. labels May 7, 2024
@dime10 dime10 merged commit 229359f into master May 9, 2024
59 of 66 checks passed
@dime10 dime10 deleted the toml-spec-schema-2 branch May 9, 2024 15:31
sergei-mironov pushed a commit to PennyLaneAI/catalyst that referenced this pull request May 24, 2024
**Context:** Transition to the quantum device config schema 2

**Description of the Change:** Solve a regarding toml schema 2 udpate in
tests by switching our test custom devices from toml text manipulations
to the device capability manipulations

**Benefits:** 
* Tests no longer require toml text manipulations.
* Tests now contain simple examples of custom devices.
* toml-specific code is now locates in `catalyst.utils.toml`. 

**Possible Drawbacks:**

**Related GitHub Issues:**
PennyLaneAI/pennylane-lightning#642

---------

Co-authored-by: David Ittah <[email protected]>
sergei-mironov pushed a commit to PennyLaneAI/catalyst that referenced this pull request May 30, 2024
**Context:** Transition to the quantum device config schema 2

**Description of the Change:**

* Remove mentions of CPhase "gate" which happens to be a Python alias
for ControlledPhaseShift.
* Remove the Python-only Projector patch because we already have a
relaxed validation procedure for observables
* Relax operation validation by allowing kokkos device to declare
C(GlobalPhase) which is a Python-only operation.

**Benefits:**
**Possible Drawbacks:** 
**Related GitHub Issues:**

* PennyLaneAI/pennylane-lightning#642
- (related discussion)
PennyLaneAI/pennylane-lightning#642 (comment)
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.

7 participants