Miscellaneous
oqd_trical.misc
¶
constants
¶
Module containing relevant constants, in SI units, for TrICal
c: float = 299792458.0
module-attribute
¶
Speed of light
e: float = 1.602176634e-19
module-attribute
¶
Elementary charge
hbar: float = 1.054571817e-34
module-attribute
¶
Reduced Planck constant
k_e: float = 8987551792.3
module-attribute
¶
Coulomb constant
epsilon_0: float = 8.8541878188e-12
module-attribute
¶
Permittivity of free space
m_u: float = 1.66053906892e-27
module-attribute
¶
Atomic mass unit
natural_l(m, q, omega)
¶
Calculates a natural length scale for a trapped ion system
Parameters:
Name | Type | Description | Default |
---|---|---|---|
m
|
float
|
Mass of ion |
required |
q
|
float
|
Charge of ion |
required |
omega
|
float
|
Trapping strength |
required |
Returns:
Type | Description |
---|---|
float
|
Natural length scale |
Source code in oqd-trical/src/oqd_trical/misc/constants.py
natural_V(m, q, omega)
¶
Calculates a natural energy scale for a trapped ion system
Parameters:
Name | Type | Description | Default |
---|---|---|---|
m
|
float
|
Mass of ion |
required |
q
|
float
|
Charge of ion |
required |
omega
|
float
|
Trapping strength |
required |
Returns:
Type | Description |
---|---|
float
|
Natural energy scale |
Source code in oqd-trical/src/oqd_trical/misc/constants.py
linalg
¶
Module containing relevant linear algebra functions for TrICal.
orthonormal_subset(x, tol=0.001)
¶
Finds an approximate orthonormal subset of a set of vectors, after normalization.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
ndarray[float]
|
Set of vectors of interest. |
required |
tol
|
float
|
Tolerance when classifying 2 vectors as orthonormal. |
0.001
|
Returns:
Type | Description |
---|---|
ndarray[float]
|
Orthonormal subset of the set of vectors of interest, after normalization. |
Source code in oqd-trical/src/oqd_trical/misc/linalg.py
multispecies
¶
Module containing useful functions relavent for multi-species systems.
dc_trap_geometry(omega)
¶
Calculates the trap geometry of a trapped ion system.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
omega
|
ndarray[float]
|
Trap strengths of primary species |
required |
Returns:
Type | Description |
---|---|
ndarray[float]
|
Trap geometry factors of the system |
Source code in oqd-trical/src/oqd_trical/misc/multispecies.py
ms_trap_strength(m, m0, omega)
¶
Calculates the transverse trap frequencies of non-primary species.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
m
|
ndarray[float]
|
Mass of ions |
required |
m0
|
float
|
Mass of primary species |
required |
omega
|
ndarray[float]
|
Trap strengths of primary species |
required |
Returns:
Type | Description |
---|---|
ndarray[float]
|
Trap strengths of the ions |
Source code in oqd-trical/src/oqd_trical/misc/multispecies.py
optimize
¶
Module containing default optimization function generators for TrICal.
dflt_opt(ti, **kwargs)
¶
Default optimization function generator for equilibrium_position method of TrappedIons class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ti
|
TrappedIons
|
Trapped ion system of interest. |
required |
Returns:
Type | Description |
---|---|
Callable
|
Default optimization function that finds the equilibrium position of the trapped ions system of interest via the minimization of the potential. |
Source code in oqd-trical/src/oqd_trical/misc/optimize.py
dflt_ls_opt(deg)
¶
Default optimization function generator for multivariate_polyfit function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
deg
|
ndarray[int]
|
Degree of polynomial used in the fit. |
required |
Returns:
Type | Description |
---|---|
Callable
|
Default optimization function that finds the best polynomial, of the specified degree, fit for the data . |
Source code in oqd-trical/src/oqd_trical/misc/optimize.py
polynomial
¶
Module containing relevant functions regarding polynomials for TrIcal.
multivariate_polyfit(x, vals, deg, l=1, opt=dflt_ls_opt)
¶
Fits a set of data with a multivariate polynomial.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
ndarray[float]
|
Independent values. |
required |
vals
|
ndarray[float]
|
Dependent value. |
required |
deg
|
ndarray[int]
|
Degree of polynomial used in the fit. |
required |
l
|
float
|
Length scale used when fitting, defaults to 1. |
1
|
opt
|
Callable
|
Generator of the appropriate optimization function for the fit. |
dflt_ls_opt
|
Returns:
Type | Description |
---|---|
ndarray[float]
|
Coefficients of the best fit multivariate polynomial, of the specified degree. |