Interface for reading Hamiltonian data from files.
More...
#include <hamiltonianfilereader.hpp>
Interface for reading Hamiltonian data from files.
This class provides functionality to read system and control Hamiltonians from files generated by the Python interface. It supports both Lindblad and Schroedinger solver and handles matrix data communication.
◆ HamiltonianFileReader() [1/2]
| HamiltonianFileReader::HamiltonianFileReader |
( |
| ) |
|
◆ HamiltonianFileReader() [2/2]
| HamiltonianFileReader::HamiltonianFileReader |
( |
std::optional< std::string > |
hamiltonian_file_Hsys, |
|
|
std::optional< std::string > |
hamiltonian_file_Hc, |
|
|
DecoherenceType |
decoherence_type_, |
|
|
PetscInt |
dim_rho_, |
|
|
bool |
quietmode_ |
|
) |
| |
Constructor with Hamiltonian file specification.
- Parameters
-
| hamiltonian_file_Hsys | Path to file containing system Hamiltonian data |
| hamiltonian_file_Hc | Path to file containing control Hamiltonian data |
| decoherence_type_ | Type of solver (Lindblad or Schroedinger) |
| dim_rho_ | Dimension of the Hilbert space |
| quietmode_ | Flag for quiet operation |
◆ ~HamiltonianFileReader()
| HamiltonianFileReader::~HamiltonianFileReader |
( |
| ) |
|
◆ receiveHc()
| void HamiltonianFileReader::receiveHc |
( |
std::vector< Mat > & |
Ac_vec, |
|
|
std::vector< Mat > & |
Bc_vec |
|
) |
| |
Receives real and imaginary control operators from file.
Reads control Hamiltonian matrices for each oscillator from the Hamiltonian file and stores them in the provided matrix vectors.
- Parameters
-
| Ac_vec | Reference to vector of matrices storing real parts of control system matrices. One per oscillator. |
| Bc_vec | Reference to vector of matrices storing imaginary parts of control matrices. One per oscillator. |
◆ receiveHsys()
| void HamiltonianFileReader::receiveHsys |
( |
Mat & |
Ad, |
|
|
Mat & |
Bd |
|
) |
| |
Reads the constant system Hamiltonian from file.
- Parameters
-
| [out] | Ad | Reference to matrix that stores the real part of the system matrix for (-i*Hsys). Must be allocated. |
| [out] | Bd | Reference to matrix that stores the imaginary part of the system matrix for (-i*Hsys). Must be allocated. |
◆ decoherence_type
Type of solver (Lindblad vs Schroedinger)
◆ dim_rho
| PetscInt HamiltonianFileReader::dim_rho |
|
protected |
Dimension of the Hilbert space (N)
◆ hamiltonian_file_Hc
| std::optional<std::string> HamiltonianFileReader::hamiltonian_file_Hc |
|
protected |
Filename for control Hamiltonian data.
◆ hamiltonian_file_Hsys
| std::optional<std::string> HamiltonianFileReader::hamiltonian_file_Hsys |
|
protected |
Filename for system Hamiltonian data.
◆ mpirank_world
| int HamiltonianFileReader::mpirank_world |
|
protected |
Rank of global MPI communicator.
◆ mpisize_world
| int HamiltonianFileReader::mpisize_world |
|
protected |
Rank of global MPI communicator.
◆ quietmode
| bool HamiltonianFileReader::quietmode |
|
protected |
Flag for quiet mode operation.
The documentation for this class was generated from the following files: