Skip to main content

Interferometer package

The ability to implement arbitrary interference between any number of optical inputs is useful for both classical and quantum optics. This package provides implementations of the following two papers:

  • Reck, Michael, et al. "Experimental realization of any discrete unitary operator." Physical review letters 73.1 (1994): 58.
  • Clements, William R., et al. "Optimal design for universal multiport interferometers." Optica 3.12 (2016): 1460-1465.

These papers show how any interfometer can be implemented by triangular or square meshes of 2x2 beam splitters, which are experimentally simple to fabricate.

This package also includes the following features:

  • a function to generate Haar-random unitary matrices of any size
  • a method for drawing interferometers using matplotlib
  • a method for building up interferometers one beam splitter at a time

Installation

This package requires python 3, and apart from the tests and the demo notebook only numpy and matplotlib are required. You can install this package with:

pip install interferometer

Examples

A demonstration notebook can be found in the notebook folder. Alternatively, you can try the following code snippet that produces a 5x5 random unitary matrix U describing an interferometer, and determines how this interferometer can be implemented using a square mesh of beam splitters.

import interferometer as itf

U = itf.random_unitary(5)
I = itf.square_decomposition(U)
I.draw()

Testing

You can run the tests from the root directory with

pip install pytest
python -m pytest

Contributing

If you want to add new features to this package, feel free to suggest pull requests!

Metadata

Release files for interferometer 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for interferometer 1.1.2
File Size Uploaded
interferometer-1.1.2.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for interferometer 1.1.2
File Interpreter ABI Platform
interferometer-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / interferometer-1.1.2.tar.gz

Download URL interferometer-1.1.2.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
604709b4824375d1bca6777bd8d6d83ae17c5bb80106b53eb9c77645b31dca8d
BLAKE2b-256 checksum
How to use checksums
6a35e6855d6ec13f026d7f2927fabdc2fbbf6ede42adf7303df4394168b1e981
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / interferometer-1.1.2-py3-none-any.whl

Download URL interferometer-1.1.2-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f6af79fb32b9f254b1f36988a24a37b9a417a8e60c7c49a81a17c2e98eb951c
BLAKE2b-256 checksum
How to use checksums
898fc8910668c3caae9fef15c4efec291a957b20cf22bfba5f83d53de767a984
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

1.1.1

2 release files

1.1

2 release files

1.0

2 release files

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page