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.

Rename `qml.Interferometer` to `qml.InterferometerUnitary`

See original GitHub issue

Feature details

As per https://github.com/PennyLaneAI/pennylane/issues/1256, we’re changing qml.Interferometer, as it collides with a the template qml.templates.Interferometer.

A short summary based on the (updated) comments in the linked issue:

In this PR we need to rename the class, and then search for lines in the code where Interferometer is translated to an implementation.

Implementation

  1. Check the default.gaussian device, and change the operation name there. More precisely, at the moment when default.gaussian encounters a gate called Interferometer, it expects it to have a param that represents the unitary which defines the interferometer’s matrix. This logic should now only be performed when it sees InterferometerUnitary. When it sees Interferometer it should not find a translation in the list, and will then decompose this operation into the gates defined in template.Interferometer. In other words, in future InterferometerUnitary is an operation that is natively supported by devices, while templates.Interferometer is an operation that is only defined by its decomposition.
  1. The representation_revolver would also require a change such that circuit drawing is updated.

See details on the possible changes to be made:

How important would you say this feature is?

2: Somewhat important. Needed this quarter.

Additional information

We’d like to have this in for v0.19.0.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
antalszavacommented, Oct 1, 2021

Hi @AkashNarayanan, that’s great to hear! 🙂 Feel free to ask any questions and open a work in progress PR.

0reactions
antalszavacommented, Oct 12, 2021

Closing with #1714 merged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

qml.Interferometer — PennyLane 0.28.0 documentation
General linear interferometer, an array of beamsplitters and phase shifters. ... Interferometer(*params, wires=range(4)) return qml.expval(qml.
Read more >
Refactoring | Qt Creator Manual - Qt Documentation
To rename a QML type in a project, select Tools > QML/JS > Rename Symbol Under Cursor or press Ctrl+Shift+R. Search Results shows...
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