rydiqule.sensor_utilsΒΆ

Utilities used by the Sensor classes.

Functions

check_positive_semi_definite(dm)

Checks if the provided matrices is a physical density matrix.

convert_complex_to_dm(complex_dm)

Converts a standard density matrices in the complex basis with ground state into rydiqule's computational real basis with ground state removed.

convert_dm_to_complex(dm)

Converts density matrices from rydiqule's computational basis (real, with state 0 removed) to a standard complex basis with all states present.

convert_to_full_dm(dm)

Converts density matrices from rydiqule's computational basis (real, with state 0 removed) to the full, real basis (ie with state 0 population inserted).

coupling_subgraph(coupling, coupling_graph)

Returns a subgraph view of the couplings_graph corresponding to coupling.

draw_diagram(sensor[, include_dephasing])

Draw a matplotlib plot that shows the energy level diagram, couplings, and dephasing paths.

expand_statespec(statespec)

Returns a list of all possible states corresponding to a given statespec.

generate_eom(hamiltonian, gamma_matrix[, ...])

Create the optical bloch equations for a hamiltonian and decoherence matrix using the Lindblad master equation.

get_basis_transform(basis_size)

Function that defines the basis transformation matrix u and its inverse u_i, between the real and complex basis.

get_rho_ij(sols, i, j)

For a given density matrix solution, retrieve a specific element of the density matrix.

get_rho_populations(sols)

For a given density matrix solution, return the diagonal populations.

make_real(equations, constant[, ground_removed])

Converts equations of motion from complex basis to real basis.

match_states(statespec, compare_list)

Return all states in a list matching the pattern described by a given specification.

nx_edges_with(couplings_graph, *keys[, method])

Returns a version of couplings_graph with only the keys specified.

process_scannable_parameter(val)

Ensures that scannable parameters are coerced to numpy arrays.

remove_ground(equations)

Remove the ground state from the equations of motion using population conservation.

scale_dipole(dipole)

Scale a dipole matrix from units of a0*e to Mrad/s when multiplied by a field in V/m.

state_tuple_to_str(states)

Helper function to create a more terse string representation of a tuple of state tuples.