Skip to content

Comments

Add Fourier interferometers explicitly to Perceval#710

Open
anthonyrtw wants to merge 2 commits intoQuandela:release/1.2.0from
anthonyrtw:fourier-interferometer
Open

Add Fourier interferometers explicitly to Perceval#710
anthonyrtw wants to merge 2 commits intoQuandela:release/1.2.0from
anthonyrtw:fourier-interferometer

Conversation

@anthonyrtw
Copy link
Contributor

Fourier interferometers are possibly the most commonly used optical component/circuit that is not directly available in Perceval currently.

Here, I've defined a Fourier interferometer class UFT(Unitary) that can be immediately defined:

from perceval import *
fourier_circuit = Circuit(m) // UFT(m)

This saves the user from calculating the Matrix form of Fourier interferometers and then explicitly defining the matrix as a Unitary.

I have also made it available from root.

pass


class UFT(Unitary):
Copy link
Contributor

Choose a reason for hiding this comment

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

Hello, rather than creating a new class, I think this would make more sense as a new catalog component, whose builder would make a unitary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi,
I think adding the UFT to the components library is fairly minimal but is a lot more concise for someone coding than:

uft = catalog["fourier interferometer"].build(m)
circuit.add(1, uft)

As opposed to simply circuit.add(1, UFT(m))

Also catalog components are generally built up from many sub-components. This can of course be done for Fourier interferometers, but I've simply taken the matrix unitary.

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.

2 participants