Implementation of the real-valued right-hand-side (RHS) system matrix of the quantum dynamical equations.
More...
|
| | MasterEq () |
| |
| | MasterEq (const Config &config, Oscillator **oscil_vec_, bool quietmode=false) |
| | Constructor with simplified configuration-based specification.
|
| |
| | ~MasterEq () |
| |
| void | set_RHS_MatMult_operation () |
| | Pass MatMult operations for applying the RHS to PETSc.
|
| |
| void | initSparseMatSolver () |
| | Initializes matrices needed for the sparse matrix solver.
|
| |
| Oscillator * | getOscillator (const size_t i) |
| | Retrieves the i-th oscillator.
|
| |
| size_t | getNOscillators () |
| | Retrieves the number of oscillators in the system.
|
| |
| PetscInt | getDim () |
| | Retrieves the dimension of the vectorized system.
|
| |
| PetscInt | getDimEss () |
| | Retrieves the dimension of the essential level system.
|
| |
| PetscInt | getDimRho () |
| | Retrieves the dimension of the density matrix.
|
| |
| int | assemble_RHS (const double t) |
| | Assembles the real-valued system matrix (RHS) at time t.
|
| |
| Mat | getRHS () |
| | Retrieves the right-hand-side system matrix.
|
| |
| void | compute_dRHS_dParams (const double t, const Vec x, const Vec x_bar, const double alpha, Vec grad) |
| | Computes gradient of RHS with respect to control parameters.
|
| |
| void | setControlAmplitudes (const Vec x) |
| | Pass control parameters from global design vector to each oscillator.
|
| |
| double | expectedEnergy (const Vec x) |
| | Computes expected energy of the full composite system.
|
| |
| void | population (const Vec x, std::vector< double > &population_com) |
| | Computes population of the full composite system.
|
| |
|
| PetscInt | dim |
| | Dimension of full vectorized system: N^2 if Lindblad, N if Schroedinger.
|
| |
| PetscInt | dim_rho |
| | Dimension of Hilbert space = N.
|
| |
| PetscInt | dim_ess |
| | Dimension of essential levels = N_e.
|
| |
| int | noscillators |
| | Number of oscillators in the system.
|
| |
| Oscillator ** | oscil_vec |
| | Array of pointers to oscillator objects.
|
| |
| Mat | RHS |
| | MatShell for real-valued, vectorized system matrix (size 2N^2 x 2N^2)
|
| |
| MatShellCtx | RHSctx |
| | Context containing data for applying the RHS to a state.
|
| |
| std::vector< Mat > | Ac_vec |
| |
| std::vector< Mat > | Bc_vec |
| |
| Mat | Ad |
| |
| Mat | Bd |
| |
| std::vector< Mat > | Ad_vec |
| |
| std::vector< Mat > | Bd_vec |
| |
| std::vector< double > | crosskerr |
| | Cross-Kerr coefficients (rad/time) \(\xi_{kl}\) for ZZ-coupling \(a_k^\dagger a_k a_l^\dagger a_l\).
|
| |
| std::vector< double > | Jkl |
| | Dipole-dipole coupling coefficients (rad/time), multiplies \(a_k^\dagger a_l + a_k a_l^\dagger\).
|
| |
| std::vector< double > | eta |
| | Frequency differences in rotating frame (rad/time) for dipole-dipole coupling.
|
| |
| bool | addT1 |
| |
| bool | addT2 |
| | Flags for including T1 decay and T2 dephasing Lindblad operators.
|
| |
| int | mpirank_world |
| | Rank of global MPI communicator.
|
| |
| int | mpirank_petsc |
| | Rank of PETSc's communicator.
|
| |
| int | mpisize_petsc |
| | Size of PETSc's communicator.
|
| |
| PetscInt | localsize_u |
| | Size of local sub vector u or v in state x=[u,v].
|
| |
| PetscInt | ilow |
| | First index of the local sub vector u,v.
|
| |
| PetscInt | iupp |
| | Last index (+1) of the local sub vector u,v.
|
| |
| IS | isu |
| |
| IS | isv |
| | Vector strides for accessing real and imaginary parts u=Re(x), v=Im(x)
|
| |
| Vec | aux |
| | Auxiliary vector for computations.
|
| |
| bool | quietmode |
| | Flag for quiet mode operation.
|
| |
| std::optional< std::string > | hamiltonian_file_Hsys |
| | Filename if a custom system Hamiltonian is read from file.
|
| |
| std::optional< std::string > | hamiltonian_file_Hc |
| | Filename if a custom control Hamiltonians are read from file.
|
| |
Implementation of the real-valued right-hand-side (RHS) system matrix of the quantum dynamical equations.
This class provides functionality for evaluating and applying the real-valued right-hand-side (RHS) system matrix of the vectorized Lindblad master equation (open quantum systems) or Schroedinger equation (closed systems). It supports a matrix-free and a sparse-matrix version for applying the RHS to a state vector. The system matrix (RHS) is stored as a Matrix Shell, that applies the real and imaginary parts of the system matrix to the corresponding parts of the state vector separately. The RHS needs to be assembled (evaluated at each time step t) before usage.
Main functionality:
- assemble_RHS for preparing the RHS system matrix shell with current control pulse values at given time t.
- compute_dRHS_dParams for updating the gradient with += x^T*RHS(t)^T*x_bar, where x & x_bar are the primal and adjoint state at time t
- setControlAmplitudes for passing the global optimization vector to each oscillator
- expectedEnergy and population for evaluating expected energy level and level occupations of the full composite system.
- definition of MatMult interface functions to multiply the RHS matrix shell to a state vector (sparse matrix multiplication or matrix-free multiplication)
This class contains references to:
- Array of Oscillator for defining the Hamiltonian matrices for each subsystem (oscillator) and for evaluating their time-dependent control pulses at each time step