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

[Strings4] Update ParametrizedHamiltonian.__repr__ to be consistent with PennyLane #5215

Merged
merged 117 commits into from
Feb 22, 2024

Conversation

Qottmann
Copy link
Contributor

@Qottmann Qottmann commented Feb 15, 2024

coeffs = [2.0, f1, f2]
ops = [qml.PauliX(0), qml.PauliY(0), qml.PauliZ(0)]
H = qml.dot(coeffs, ops)
print(H)
(
    2.0 * X(0)
  + f1(params_0, t) * Y(0)
  + f2(params_1, t) * Z(0)
)
  • Update repr
  • Update tests
  • Update docs
  • changelog
  • Update qml.dot docs

builds on top of #5153
[sc-57051]

@Qottmann Qottmann requested a review from a team February 21, 2024 12:49
Copy link
Contributor

@lillian542 lillian542 left a comment

Choose a reason for hiding this comment

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

Left one question, but about an edge case I'm not sure could even occur, nothing blocking. Looks good to me 🎉

pennylane/pulse/parametrized_hamiltonian.py Outdated Show resolved Hide resolved
@Qottmann Qottmann added this to the v0.35 milestone Feb 21, 2024
@trbromley trbromley self-requested a review February 21, 2024 17:46
Copy link
Contributor

@timmysilv timmysilv left a comment

Choose a reason for hiding this comment

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

looks great!

Base automatically changed from docstrings to master February 22, 2024 13:41
@Qottmann Qottmann enabled auto-merge (squash) February 22, 2024 13:43
@Qottmann Qottmann merged commit e166f7e into master Feb 22, 2024
38 checks passed
@Qottmann Qottmann deleted the morerepr branch February 22, 2024 14:06
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.

4 participants