qml.qchem.taylor_hamiltonian¶
- taylor_hamiltonian(pes, max_deg=4, min_deg=3, mapping='binary', n_states=2, wire_map=None, tol=1e-12)[source]¶
Returns Taylor vibrational Hamiltonian.
The Taylor vibrational Hamiltonian is defined in terms of kinetic \(T\) and potential \(V\) components as:
\[H = T + V.\]The kinetic term is defined in terms of momentum \(p\) operator as
\[T = \sum_{i\geq j} K_{ij} p_i p_j,\]where the \(K\) matrix is defined in terms of vibrational frequencies, \(\omega\), and mode localization unitary matrix, \(U\), as:
\[K_{ij} = \sum_{k=1}^M \frac{\omega_k}{2} U_{ki} U_{kj}.\]The potential term is defined in terms of the normal coordinate operator \(q\) as:
\[V(q_1,\cdots,q_M) = V_0 + \sum_{i=1}^M V_1^{(i)}(q_i) + \sum_{i>j} V_2^{(i,j)}(q_i,q_j) + \sum_{i<j<k} V_3^{(i,j,k)}(q_i,q_j,q_k) + \cdots,\]where \(V_n\) represents the \(n\)-mode component of the potential energy surface computed along the normal coordinate. The \(V_n\) terms are defined as:
\[\begin{split}V_0 &\equiv V(q_1=0,\cdots,q_M=0) \\ V_1^{(i)}(q_i) &\equiv V(0,\cdots,0,q_i,0,\cdots,0) - V_0 \\ V_2^{(i,j)}(q_i,q_j) &\equiv V(0,\cdots,q_i,\cdots,q_j,\cdots,0) - V_1^{(i)}(q_i) - V_1^{(j)}(q_j) - V_0 \\ \nonumber \vdots\end{split}\]These terms are then used in a multi-dimensional polynomial fit with a polynomial specified by
min_deg
andmax_deg
to get \(n\)-mode Taylor coefficients. For instance, the one-mode Taylor coefficient \(\Phi\) is related to the one-mode potential energy surface data as:\[V_1^{(j)}(q_j) \approx \Phi^{(2)}_j q_j^2 + \Phi^{(3)}_j q_j^3 + ...\]Similarly, the two-mode and three-mode Taylor coefficients are computed if the two-mode and three-mode potential energy surface data, \(V_2^{(j, k)}(q_j, q_k)\) and \(V_3^{(j, k, l)}(q_j, q_k, q_l)\), are provided.
This real space form of the vibrational Hamiltonian can be represented in the bosonic basis by using equations defined in Eqs. 6, 7 of arXiv:1703.09313:
\[\hat q_i = \frac{1}{\sqrt{2}}(b_i^\dagger + b_i), \quad \hat p_i = \frac{1}{\sqrt{2}}(b_i^\dagger - b_i),\]where \(b^\dagger\) and \(b\) are bosonic creation and annihilation operators, respectively.
The bosonic Hamiltonian is then converted to a qubit operator with a selected
mapping
method to obtain a linear combination as:\[H = \sum_{i} c_i P_i,\]where \(P\) is a tensor product of Pauli operators and \(c\) is a constant.
- Parameters:
pes (VibrationalPES) – object containing the vibrational potential energy surface data
max_deg (int) – maximum degree of the polynomial used to compute the coefficients
min_deg (int) – minimum degree of the polynomial used to compute the coefficients
mapping (str) – Method used to map to qubit basis. Input values can be
"binary"
or"unary"
. Default is"binary"
.n_states (int) – maximum number of allowed bosonic states
wire_map (dict) – A dictionary defining how to map the states of the Bose operator to qubit wires. If
None
, integers used to label the bosonic states will be used as wire labels. Defaults toNone
.tol (float) – tolerance for discarding the imaginary part of the coefficients during mapping
- Returns:
the Taylor Hamiltonian
- Return type:
Example
>>> freqs = np.array([0.0249722]) >>> pes_onemode = np.array([[0.08477, 0.01437, 0.00000, 0.00937, 0.03414]]) >>> pes_object = qml.qchem.VibrationalPES(freqs=freqs, pes_data=[pes_onemode], localized=False) >>> ham = qml.qchem.taylor_hamiltonian(pes_object) >>> print(ham) 0.026123120450329353 * I(0) + -0.01325338030021957 * Z(0) + -0.0032539545260859464 * X(0)