Skip to main content

Laser physics / simulation utilities

Project description

LaserPy_Quantum

LaserPy_Quantum

LaserPy_Quantum provides an intuitive interface for simulating complex laser interactions, current drivers, and interferometer setups, with plans to offload performance-critical components to Rust for high-speed numerical computations. A high-level, open-source Python library designed for the theoretical simulation of laser systems in quantum communication and cryptographic protocols.

🚀 Features

  • High-Level API for constructing laser-based quantum system simulations.
  • Support for arbitrary waveform generation (AWG) and current drivers.
  • Simulation of master–slave laser - configurations with injection locking.
  • Built-in support for asymmetric Mach–Zehnder interferometers (AMZI) and photon detectors.
  • Clock-driven simulation engine for precise time-step control.
  • Extensible architecture for future modules and Rust acceleration.

📖 Documentation

LaserPy_Quantum documentation on Read the docs.

📦 Installation

  • LaserPy_Quantum is now on pypi.
pip install LaserPy_Quantum
  • Also, LaserPy_Quantum is under active development and welcomes opensource developers. Clone the repository locally:
git clone https://github.com/Mathwizard1/LaserPy_Quantum.git
cd LaserPy_Quantum
pip install -e .

Ensure you’re using Python 3.9+.

📝 Example Usage

Below is an example of using LaserPy_Quantum component and connection system with simulator:

############################################################################
from LaserPy_Quantum import Clock
from LaserPy_Quantum import Connection, Simulator
from LaserPy_Quantum import StaticWave, ArbitaryWaveGenerator
from LaserPy_Quantum import CurrentDriver
from LaserPy_Quantum import Laser

############################################################################
dt = 1e-12
t_unit = 1e-9
t_final = 100 * t_unit
#sampling_rate = 2 * dt

# Current Constants
I_th = 0.0178
MASTER_BASE_DC = 1.4 * I_th

mBase = StaticWave("mBase", MASTER_BASE_DC)

AWG = ArbitaryWaveGenerator()
AWG.set(mBase)

############################################################################

current_driver1 = CurrentDriver(AWG)
current_driver1.set(mBase)

master_laser = Laser(name= "master_laser")

simulator_clock = Clock(dt)
simulator_clock.set(t_final)

simulator = Simulator(simulator_clock)

simulator.set((
    Connection(simulator_clock, current_driver1),
    Connection(current_driver1, master_laser),
))

simulator.reset(True)

🧠 Use Case: Laser simulations

LaserPy_Quantum’s current use case is simulating quantum key distribution (QKD) protocols using master–slave lasers with injection locking and interferometer-based detection.
It allows researchers and engineers to prototype and test theoretical setups before implementing them in hardware.

🔧 Planned Features

  • Rust-based backend for high-performance simulation.
  • Expanded library of optical components (modulators, detectors, etc.).

TODO list

  1. Do a _setup method specific to loading constants

  2. global config singleton

  3. Quantum gates (WIP)

  4. Rust based critical parts off-loading

  5. Component behaviour refinement

  6. More components

  7. GUI

🤝 Contributing

We welcome contributions!
Feel free to fork the repo, open issues, or submit pull requests.

📜 License

LaserPy_Quantum is distributed under a dual-license model to support both the open-source community and commercial applications.

  • Open Source: For academic, personal, and open-source projects, LaserPy_Quantum is licensed under the GNU General Public License v3.0 (GPLv3). Note: Modifications or Derived works on Components system requires maintainer's permission.

  • Commercial: For use in proprietary or commercial software where the terms of GPLv3 are not suitable, a separate commercial license is available. Please contact the maintainer to discuss licensing options.

📬 Contact

Maintained by Anshurup Gupta.
For questions or collaborations, open an issue or email.

Project details


Download files

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

Source Distribution

laserpy_quantum-0.0.11.tar.gz (27.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

laserpy_quantum-0.0.11-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

Details for the file laserpy_quantum-0.0.11.tar.gz.

File metadata

  • Download URL: laserpy_quantum-0.0.11.tar.gz
  • Upload date:
  • Size: 27.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for laserpy_quantum-0.0.11.tar.gz
Algorithm Hash digest
SHA256 8c18a4f5c916f1476350b57224af4bc799110efd0351f243a0f34cc1ee4984a0
MD5 cbf0a08a7b0d30e56d51f1d75a202764
BLAKE2b-256 c98c513a70a92f1ce8936051b54121a0fd52d8a41b666f2eeb1f670bbda9440e

See more details on using hashes here.

File details

Details for the file laserpy_quantum-0.0.11-py3-none-any.whl.

File metadata

File hashes

Hashes for laserpy_quantum-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 68b555c3b0e1b64dbf3aeb82e65b8dce1e8f2d05b4f7e5e841edba181efb5a76
MD5 73f34cef20bb4a547d6f219a38ca00ca
BLAKE2b-256 7524e1289cde740b44371df984445f7c926ca80514cdd4342a089950997ab12d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page