Simphony: A Simulator for Photonic circuits
Project description
Simphony: A Simulator for Photonic circuits
Simphony, a simulator for photonic circuits, is a fundamental package for designing and simulating photonic integrated circuits with Python.
Key Features:
- Free and open-source software provided under the MIT License
- Completely scriptable using Python 3.
- Cross-platform: runs on Windows, MacOS, and Linux.
- Subnetwork growth routines
- A simple, extensible framework for defining photonic component compact models.
- A SPICE-like method for defining photonic circuits.
- Complex simulation capabilities.
- Included model libraries from SiEPIC and SiPANN.
Developed by CamachoLab at Brigham Young University.
Installation
Simphony can be installed via pip using Python 3:
python3 -m pip install simphony
Please note that Python 2 is not supported. With the official deprecation of Python 2 (January 1, 2020), no future compatability is planned.
Documentation
The documentation is hosted online.
Changelogs can be found in docs/changelog/. There is a changelog file for each released version of the software.
Example
Simphony includes a built-in compact model library with some common components but can easily be extended to include custom libraries.
Scripting circuits is simple and short. There are four main parts to running a simulation in Simphony:
- Define which component models will be used in the circuit.
- Add instances of components into a circuit.
- Define connection points.
- Run a simulation.
The following script models the MZI circuit shown above:
from simphony.libraries import siepic
from simphony.netlist import Subcircuit
from simphony.simulation import SweepSimulation
import matplotlib.pyplot as plt
# Declare the models used in the circuit
gc = siepic.ebeam_gc_te1550() # grating coupler
y = siepic.ebeam_y_1550() # y-branch
wg150 = siepic.ebeam_wg_integral_1550(length=150e-6) # 150 micron waveguide
wg50 = siepic.ebeam_wg_integral_1550(length=50e-6) # 50 micron waveguide
# Create the circuit, add all individual instances
circuit = Subcircuit('MZI')
e = circuit.add([
(gc, 'input'),
(gc, 'output'),
(y, 'splitter'),
(y, 'recombiner'),
(wg150, 'wg_long'),
(wg50, 'wg_short'),
])
# You can set pin names individually:
circuit.elements['input'].pins['n2'] = 'input'
circuit.elements['output'].pins['n2'] = 'output'
# Or you can rename all the pins simultaneously:
circuit.elements['splitter'].pins = ('in1', 'out1', 'out2')
circuit.elements['recombiner'].pins = ('out1', 'in2', 'in1')
# Circuits can be connected using the elements' string names:
circuit.connect_many([
('input', 'n1', 'splitter', 'in1'),
('splitter', 'out1', 'wg_long', 'n1'),
('splitter', 'out2', 'wg_short', 'n1'),
('recombiner', 'in1', 'wg_long', 'n2'),
('recombiner', 'in2', 'wg_short', 'n2'),
('output', 'n1', 'recombiner', 'out1'),
])
# Run a simulation on the netlist.
simulation = SweepSimulation(circuit, 1500e-9, 1600e-9)
result = simulation.simulate()
f, s = result.data('input', 'output')
plt.plot(f, s)
plt.title("MZI")
plt.tight_layout()
plt.show()
More examples can be found in the online documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simphony-0.5.0.tar.gz.
File metadata
- Download URL: simphony-0.5.0.tar.gz
- Upload date:
- Size: 4.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2a7dec0ed97ff573aef9623281d7e243cb52c9c5de6e468cc8b95545ef121bc
|
|
| MD5 |
6079bb9c61408fdca64dd56dffacce3d
|
|
| BLAKE2b-256 |
2e2be231ae7e02d658100491ebdda48affc86d534e8f87dfcde0e7b5f37f4907
|
File details
Details for the file simphony-0.5.0-py3-none-any.whl.
File metadata
- Download URL: simphony-0.5.0-py3-none-any.whl
- Upload date:
- Size: 4.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8301748baeb4da22cabfb5d391c8bc937f4fa8a658b19daecea69c453563d89e
|
|
| MD5 |
f5358ed7cf1c4bc5f9a7c3099b249e15
|
|
| BLAKE2b-256 |
0b90464e7e5aa36cca1facc08098a3b7100dc22211eebe90a0abe55bce90db91
|