Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

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.


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.


The documentation is hosted online.

Changelogs can be found in docs/changelog/. There is a changelog file for each released version of the software.


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:

  1. Define which component models will be used in the circuit.
  2. Add instances of components into a circuit.
  3. Define connection points.
  4. Run a simulation.

The following script models the MZI circuit shown above:

from simphony.library import siepic
from simphony.netlist import Subcircuit
from simphony.simulation import SweepSimulation

# 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:
    ('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 ='input', 'output')
plt.plot(f, s)

More examples can be found in the online documentation.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for simphony, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size simphony-0.3.0-py3-none-any.whl (5.1 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size simphony-0.3.0.tar.gz (4.7 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page