question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consequences of removing DiagonalOperation

See original GitHub issue

I have two questions on this:

https://github.com/PennyLaneAI/pennylane/blob/927c4c67a1e1f9c79a5d7d4e89c496fac418657f/pennylane/ops/qubit/attributes.py#L169-L187

  1. IsingZZ seems to be missing in this list, which maybe shows that the old model of observables being able to declare themselves that they are diagonal was superior over having a centralized list?

  2. How can custom Operations declare that they are diagonal now? Should they modify the pennylane.ops.qubit.attributes.diagonal_in_z_basis?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
mariaschuldcommented, Jan 20, 2022

I added some of your explanation in the docstring @glassnotes, thanks so much.

0reactions
cvjjmcommented, Jan 19, 2022

If all apps using this list are smart enough to do the “alternative accumulation” for Rot than this is of course great!

Read more comments on GitHub >

github_iconTop Results From Across the Web

understanding the value of eliminating an off- diagonal term in ...
off-diagonal element. This paper examines the effect of removing an off-diagonal term to build a basis for an optimum decoupling.
Read more >
Diagonal matrix - Wikipedia
In linear algebra, a diagonal matrix is a matrix in which the entries outside the main diagonal are all zero; the term usually...
Read more >
Removing diagonal elements from matrix in R - Stack Overflow
This is a little circuitous but it results in what I see as a correct answer. I would be interested in seeing an...
Read more >
Matrix Diagonals - R
Extract or replace the diagonal of a matrix, or construct a diagonal matrix. ... Using diag(x) can have unexpected effects if x is...
Read more >
Diagonal matrix - StatLect
Diagonal matrix. by Marco Taboga, PhD. A diagonal matrix is a square matrix whose off-diagonal entries are all equal to zero. A diagonal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found