Photon and Utilities

Photon tools

class Photon(field: complex = (1e-12+0j), frequency: float = 1e-12, photon_number: float = 1e-12, source_phase: float = 1e-12, photon_id: int = <factory>, qubit_index: int = -1, quantum_entangler: QuantumEntangler | None = None)[source]

Bases: object

Photon class.

field: complex
frequency: float
photon_number: float
source_phase: float
photon_id: int
qubit_index: int
quantum_entangler: QuantumEntangler | None
classmethod from_photon(other: Photon) Photon[source]

Photon classmethod from photon deepcopy method

property amplitude: float

amplitude (V/m) of the field

property phase: float

phase (rad) of the field

property wavelength: float

wavelength (m) of the photon

photon_density(Vol: float)[source]
qubit()[source]

Simulation helpers

utils for LaserPy_Quantum

display_class_instances_data(class_instances: tuple[DataComponent, ...], time_data: ndarray, simulation_keys: tuple[str, ...] | None = None)[source]

display merged graph for comparision of same class members data

get_time_delay_phase_correction(laser: Laser, time_delay: float)[source]

Calculate the phase correction for a given time delay.

Parameters:
  • laser (Laser) – Laser instance for which we want the phase correction

  • time_delay (float)

Returns:

Phase correction in radians in the range [-pi, pi)

Return type:

float

class SellmeierFormula(_coeffs: tuple[float, ...])[source]

Bases: object

SellmeierFormula class. It uses coefficients of wavelength in microns.

class RefractiveMaterial(name: str = 'default_refractive_material')[source]

Bases: object

n(wavelength: float, material_axis=None) Any[source]
dn_dwavelength(wavelength: float, material_axis=None) Any[source]
class Isotropic(refractive: SellmeierFormula, name='default_isotropic_material')[source]

Bases: RefractiveMaterial

n(wavelength: float, material_axis=None)[source]
dn_dwavelength(wavelength: float, material_axis=None)[source]
class Birefringent(ordinary: SellmeierFormula, extraordinary: SellmeierFormula, crystal_angle=0.0, name='default_birefringent_material')[source]

Bases: RefractiveMaterial

set(crystal_angle: float)[source]
n(wavelength: float, material_axis: Literal['H', 'V'] | None = None)[source]
dn_dwavelength(wavelength: float, material_axis: Literal['H', 'V'] | None = None)[source]