Time Development¶
Time-dependent coupled-cluster parent class¶
-
class
coupled_cluster.tdcc.
TimeDependentCoupledCluster
(system)¶ Time Dependent Coupled Cluster Parent Class
Abstract base class defining the skeleton of a time-dependent Coupled Cluster solver class.
- Parameters
system (QuantumSystem) – Class instance defining the system to be solved
-
property
amp_template
¶ Returns static _amp_template, for setting initial conditions etc
-
amplitudes_from_array
(y)¶ Construct AmplitudeContainer from numpy array.
-
compute_left_phase
(current_time, y)¶ Function computing the inner product of the (potentially time-dependent) reference state and the left coupled-cluster wave function. That is,
\[\langle \tilde{\Psi}(t) \rvert \Phi \rangle = \exp(-\tau_0)[1 - \langle \Phi \rvert \hat{\Lambda}(t) \hat{T}(t) \lvert \Phi \rangle],\]where \(\tau_0\) is the zeroth cluster amplitude.
- Returns
The left-phase describing the weight of the reference determinant.
- Return type
complex128
-
compute_one_body_expectation_value
(current_time, y, mat, make_hermitian=True)¶ Function computing the expectation value of a one-body operator \(\hat{A}\). This is done by evaluating
\[\langle A \rangle = \rho^{q}_{p} A^{p}_{q},\]where \(p, q\) are general single-particle indices and \(\rho^{q}_{p}\) is the one-body density matrix.
- Parameters
current_time (float) – The current time step.
y (np.ndarray) – The amplitudes at the current time step.
mat (np.ndarray) – The one-body operator to evaluate (\(\hat{A}\)), as a matrix. The dimensionality of the matrix must be the same as the one-body density matrix, i.e., \(\mathbb{C}^{l \times l}\), where
l
is the number of basis functions.make_hermitian (bool) – Whether or not to make the one-body density matrix Hermitian. This is done by \(\tilde{\boldsymbol{\rho}} = \frac{1}{2}(\boldsymbol{\rho}^{\dagger} + \boldsymbol{\rho}), where :math:\)tilde{boldsymbol{rho}}` is the Hermitian one-body density matrix. Default is
make_hermitian=True
.
- Returns
The expectation value of the one-body operator.
- Return type
complex
See also
TimeDependentCoupledCluster.compute_one_body_density_matrix
,CoupledCluster.compute_one_body_expectation_value
-
compute_particle_density
(current_time, y)¶ Computes current one-body density
- Returns
One-body density of system at current time step
- Return type
np.array
-
compute_reference_weight
()¶ Function computing the weight of the reference state in the time-evolved coupled-cluster wave function. This is given by
\[W(t) = \frac{1}{4} \vert \langle \tilde{\Psi}(t) \rvert \Phi \rangle^{*} + \langle \Phi \rvert \Psi(t) \rangle \vert^2,\]where the inner-products are the left- and right-phase expressions.
- Returns
The weight of the reference state in the time-evolved wave function.
- Return type
complex128
-
compute_right_phase
(current_time, y)¶ Function computing the inner product of the (potentially time-dependent) reference state and the right coupled-cluster wave function. That is,
\[\langle \Phi \rvert \Psi(t) \rangle = \exp(\tau_0),\]where \(\tau_0\) is the zeroth cluster amplitude.
- Returns
The right-phase describing the weight of the reference determinant.
- Return type
complex128
-
static
construct_amplitude_template
(truncation, n, m, np)¶ Constructs an empty AmplitudeContainer with the correct shapes, for convertion between arrays and amplitudes.
-
abstract
rhs_l_amplitudes
()¶ Function that needs to be implemented as a generator. The generator should return the l-amplitudes right hand sides, in order of increasing excitation. For example, for ccsd, this function should contain:
yield compute_l_1_amplitudes yield compute_l_2_amplitudes
-
abstract
rhs_t_amplitudes
()¶ Function that needs to be implemented as a generator. The generator should return the t-amplitudes right hand sides, in order of increasing excitation. For example, for ccsd, this function should contain:
yield compute_t_1_amplitudes yield compute_t_2_amplitudes
TDCCD¶
-
class
coupled_cluster.ccd.
TDCCD
(system)¶ Time Dependent Coupled Cluster Doubles
Computes time development of system, employed coupled cluster method with double exctiations.
- Parameters
system (QuantumSystem) – Class instance defining the system to be solved
np (module) – Matrix/linear algebra library to be uses, like numpy or cupy
integrator (Integrator) – Integrator class instance (RK4, GaussIntegrator)
-
compute_energy
(current_time, y)¶ Computes energy of a given amplitudes array.
- Returns
Energy
- Return type
float
-
compute_one_body_density_matrix
(current_time, y)¶ Computes one-body density matrix
- Returns
One-body density matrix
- Return type
np.array
-
compute_overlap
(current_time, y_a, y_b)¶ Computes overlap of current two states a and b.
- Parameters
y_a (np array) – Array of amplitudes of state a
y_a – Array of amplitudes of state b
- Returns
Probability of ground state
- Return type
np.complex128
-
compute_two_body_density_matrix
(current_time, y)¶ Computes two-body density matrix at current time step.
- Returns
Two-body density matrix
- Return type
np.array
-
rhs_l_amplitudes
()¶ Function that needs to be implemented as a generator. The generator should return the l-amplitudes right hand sides, in order of increasing excitation. For example, for ccsd, this function should contain:
yield compute_l_1_amplitudes yield compute_l_2_amplitudes
-
rhs_t_amplitudes
()¶ Function that needs to be implemented as a generator. The generator should return the t-amplitudes right hand sides, in order of increasing excitation. For example, for ccsd, this function should contain:
yield compute_t_1_amplitudes yield compute_t_2_amplitudes
TDCCSD¶
-
class
coupled_cluster.ccsd.
TDCCSD
(system)¶ -
rhs_l_amplitudes
()¶ Function that needs to be implemented as a generator. The generator should return the l-amplitudes right hand sides, in order of increasing excitation. For example, for ccsd, this function should contain:
yield compute_l_1_amplitudes yield compute_l_2_amplitudes
-
rhs_t_amplitudes
()¶ Function that needs to be implemented as a generator. The generator should return the t-amplitudes right hand sides, in order of increasing excitation. For example, for ccsd, this function should contain:
yield compute_t_1_amplitudes yield compute_t_2_amplitudes
-
Orbital-adaptive time-dependent coupled-cluster parent class¶
-
class
coupled_cluster.oatdcc.
OATDCC
(system, C=None, C_tilde=None)¶ Abstract base class defining the skeleton of an orbital-adaptive time-dependent coupled cluster solver class.
Note that this solver _only_ supports a basis of orthonomal orbitals. If the original atomic orbitals are not orthonormal, this can solved done by transforming the ground state orbitals to the Hartree-Fock basis.
-
compute_one_body_expectation_value
(current_time, y, mat, make_hermitian=True)¶ Function computing the expectation value of a one-body operator \(\hat{A}\). This is done by evaluating
\[\langle A \rangle = \rho^{q}_{p} A^{p}_{q},\]where \(p, q\) are general single-particle indices and \(\rho^{q}_{p}\) is the one-body density matrix.
- Parameters
current_time (float) – The current time step.
y (np.ndarray) – The amplitudes and coefficients at the current time step.
mat (np.ndarray) – The one-body operator to evaluate (\(\hat{A}\)), as a matrix. The dimensionality of the matrix must be the same as the one-body density matrix, i.e., \(\mathbb{C}^{l \times l}\), where
l
is the number of basis functions.make_hermitian (bool) – Whether or not to make the one-body density matrix Hermitian. This is done by \(\tilde{\boldsymbol{\rho}} = \frac{1}{2}(\boldsymbol{\rho}^{\dagger} + \boldsymbol{\rho}), where :math:\)tilde{boldsymbol{rho}}` is the Hermitian one-body density matrix. Default is
make_hermitian=True
.
- Returns
The expectation value of the one-body operator.
- Return type
complex
See also
OATDCC.compute_one_body_density_matrix
,TimeDependentCoupledCluster.compute_one_body_expectation_value
-
abstract
compute_overlap
(current_time, y_a, y_b)¶ The time-dependent overlap for orbital-adaptive coupled cluster changes due to the time-dependent orbitals in the wavefunctions.
-
compute_particle_density
(current_time, y)¶ Computes current one-body density
- Returns
One-body density of system at current time step
- Return type
np.array
-
OATDCCD¶
-
class
coupled_cluster.ccd.
OATDCCD
(system, C=None, C_tilde=None)¶ -
compute_overlap
(current_time, y_a, y_b)¶ Computes time dependent overlap with respect to a given cc-state
-
rhs_l_amplitudes
()¶ Function that needs to be implemented as a generator. The generator should return the l-amplitudes right hand sides, in order of increasing excitation. For example, for ccsd, this function should contain:
yield compute_l_1_amplitudes yield compute_l_2_amplitudes
-
rhs_t_amplitudes
()¶ Function that needs to be implemented as a generator. The generator should return the t-amplitudes right hand sides, in order of increasing excitation. For example, for ccsd, this function should contain:
yield compute_t_1_amplitudes yield compute_t_2_amplitudes
-