mindquantum.algorithm.nisq.uccsd_singlet_generator

View Source On Gitee
mindquantum.algorithm.nisq.uccsd_singlet_generator(n_qubits, n_electrons, anti_hermitian=True)[source]

Create a singlet UCCSD generator for a system with n_electrons.

This function generates a FermionOperator for a UCCSD generator designed to act on a single reference state consisting of n_qubits spin orbitals and n_electrons electrons, that is a spin singlet operator, meaning it conserves spin.

Parameters
  • n_qubits (int) – Number of spin-orbitals used to represent the system, which also corresponds to number of qubits in a non-compact map.

  • n_electrons (int) – Number of electrons in the physical system.

  • anti_hermitian (bool) – Flag to generate only normal CCSD operator rather than unitary variant, primarily for testing

Returns

FermionOperator, Generator of the UCCSD operator that builds the UCCSD wavefunction.

Examples

>>> from mindquantum.algorithm.nisq.chem import uccsd_singlet_generator
>>> uccsd_singlet_generator(4, 2)
-s_0 [0^ 2] +
-d1_0 [0^ 2 1^ 3] +
-s_0 [1^ 3] +
-d1_0 [1^ 3 0^ 2] +
s_0 [2^ 0] +
d1_0 [2^ 0 3^ 1] +
s_0 [3^ 1] +
d1_0 [3^ 1 2^ 0]