pyEPR.calcs.hamiltonian module

Hamiltonian and Matrix Operations. Hamiltonian operations heavily draw on qutip package. This package must be installed for them to work.

class pyEPR.calcs.hamiltonian.HamOps[source]

Bases: object

static closest_state_to(s: qutip.qobj.Qobj, energyMHz, evecs)[source]

Returns the energy of the closest state to s

static closest_state_to_idx(s: qutip.qobj.Qobj, evecs)[source]

Returns the index

static fock_state_on(d: dict, fock_trunc: int, N_modes: int)[source]

d={mode number: # of photons} In the bare eigen basis

static identify_Fock_levels(fock_trunc: int, evecs, N_modes=2, Fock_max=4)[source]

Return quantum numbers in terms of the undiagonalized eigenbasis.

class pyEPR.calcs.hamiltonian.MatrixOps[source]

Bases: object

static cos(op_cos_arg: qutip.qobj.Qobj)[source]

Make cosine operator matrix from argument op_cos_arg

op_cos_arg (qutip.Qobj) : argument of the cosine
static cos_approx(x, cos_trunc=5)[source]

Create a Taylor series matrix approximation of the cosine, up to some order.

static dot(ais, bis)[source]

Dot product