Skip to main content

QwaveMPS logo

QwaveMPS

build Codecov Documentation Status PyPI version Python Version License

Matrix-product-state simulations of non-Markovian waveguide QED

QwaveMPS is an open-source Python package that calculates light-matter interactions in waveguide QED systems using Matrix Product States, allowing one to study delayed feedback effects in the non-Markovian regime.

QwaveMPS is an open-source Python library for simulating one-dimensional quantum many-body systems using Matrix Product States (MPS). Designed for researchers and students, it provides a user-friendly interface for constructing, evolving, and analyzing quantum states and operators, facilitating studies in quantum physics and quantum information. This approach enables efficient, scalable simulations by focusing computational resources on the most relevant parts of the quantum system. Thus, one can study delayed feedback effects in the non-Markovian regime at a highly reduced computational cost compared to full Hilbert space approaches, making it practical to model open waveguide QED systems.

Features

  • Nonlinear non-Markovian waveguide-QED problems: Solve problems involving multiphoton and multiatom systems with time-delayed feedback.
  • Matrix product states (MPS): Based on MPS theory for efficient numerical exact results that do not rely on Monte Carlo simulations.
  • Open-source Python package: Python library with minimal dependencies on external packages.
  • User-friendly framework: Designed to be accessible for researchers and students.
  • Comprehensive Resources: Documentation and examples provided to support learning and usage.

Installation

This package can be installed using the following command:

pip install QwaveMPS

Usage

The following diagram summarizes the QwaveMPS framework, showing the main input and output parameters. For detailed usage information, see our documentation.

Diagram of the code workflow

Documentation

Read the full documentation at https://qwavemps.readthedocs.io

Simple example: Population dynamics of a TLS in an infinite waveguide

Import the necessary packages:

import numpy as np
import QwaveMPS as qmps

Define the simulation parameters:

delta_t = 0.05 # Time step of the simulation
tmax = 8 # Maximum simulation time
tlist=np.arange(0,tmax+delta_t,delta_t)
d_t_l=2 #Size of right-channel time bin (choose 2 for 1 photon per bin)
d_t_r=2 #Size of left-channel time bin 
d_t_total=np.array([d_t_l,d_t_r])

d_sys1=2 # tls bin dimension
d_sys_total=np.array([d_sys1]) #total system bin

gamma_l,gamma_r=qmps.coupling('symmetrical',gamma=1)
input_params = qmps.parameters.InputParams(
    delta_t=0.05, 
    tmax = 8,
    d_sys_total=d_sys_total,
    d_t_total=d_t_total,
    gamma_l=gamma_l,
    gamma_r=gamma_r,  
    bond_max=4 # Maximum bond dimension, truncates entanglement information
)

Choose the initial state:

sys_initial_state=qmps.states.tls_excited() #TLS initially excited
wg_initial_state = qmps.states.vacuum(tmax,input_params) #waveguide in vacuum

Choose the Hamiltonian:

hm = qmps.hamiltonian_1tls(input_params)

Calculate time evolution of the system:

bins = qmps.t_evol_mar(hm,sys_initial_state,wg_initial_state,input_params)

Choose operators to calculate population dynamics:

tls_pop_op = qmps.tls_pop()
flux_op_l = qmps.b_pop_l(input_params)
flux_op_r = qmps.b_pop_r(input_params)
flux_ops = [flux_op_l, flux_op_r]

Calculate population dynamics with operators or lists of operators:

tls_pop = qmps.single_time_expectation(bins.system_states, tls_pop_op)
photon_fluxes = qmps.single_time_expectation(bins.output_field_states, flux_ops)

Plot of population dynamics:

state Image

Check the full example for more details

License

QwaveMPS is distributed under the GNU GPLv3. See LICENSE for more information.

Citing QwaveMPS

If you use QwaveMPS in your research, please consider citing our paper: arXiv

Contact

For questions or support, open an issue or email qwavemps@gmail.com.

If you encounter a bug or have a feature request, please open an issue on the issue tracker to report it.

Metadata

Release files for QwaveMPS 1.0.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 QwaveMPS 1.0.2
File Size Uploaded
qwavemps-1.0.2.tar.gz 958.6 kB Details

Built distribution (wheel)

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

Total release size: 998.5 kB

Release files / qwavemps-1.0.2.tar.gz

Download URL qwavemps-1.0.2.tar.gz
Size 958.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c4d9ca69c35699461ceefe0c76704cd87118b01bfef761b9c285a8ef49edf260
BLAKE2b-256 checksum
How to use checksums
0acaac2c87fc0c9ca3c3490d69e7ea89c11c367d8104ed0fd3f1417bc7252f55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / qwavemps-1.0.2-py3-none-any.whl

Download URL qwavemps-1.0.2-py3-none-any.whl
Size 39.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aabb87dc5f58d21d5f715a7a8025946a1599801260617f21179b32bf0708f8c9
BLAKE2b-256 checksum
How to use checksums
9a159103f565fee19dc6e15826ff28490a00d20efa7a31dcd8aa6f203f6b38ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

2 release files

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