Skip to content

LUCENT-UTSA/Photran-Tool

Repository files navigation

Photonic Transformer with Micro Ring Resonators

Overview

This repository contains a model of a transformer architecture built using a photonic core based on micro ring resonators. The photonic core enables matrix multiplication where weights are encoded as voltage inputs to micro ring modulators.

Files

  • micro_ring_resonator.py: Model of a micro ring resonator.
  • photonic_core.py: Implementation of a photonic core for matrix multiplication.
  • photonic_transformer.py: Transformer model using the photonic core.
  • train_transformer.py: Script for training the transformer and finding the weight voltages.
  • calculate_power.py: Script for calculating the power of the entire transformer architecture.
  • plot_results.py: Script to plot the input and output of micro ring modulators.

Getting Started

  1. Clone the Repository:
    git clone https://github.com/yourusername/photonic-transformer.git
    cd photonic-transformer
    
    

Install Dependencies

pip install torch matplotlib

Train the model

python train_transformer.py

Calculate Power Consumption

python calculate_power.py

Plot results

python plot_results.py

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages