quri_parts.openfermion.ansatz.uccsd module#

class quri_parts.openfermion.ansatz.uccsd.TrotterUCCSD(n_spin_orbitals: int, n_fermions: int, fermion_qubit_mapping: ~quri_parts.openfermion.transforms.OpenFermionQubitMapping = <quri_parts.openfermion.transforms.OpenFermionJordanWigner object>, trotter_number: int = 1, use_singles: bool = True, delta_sz: int = 0, singlet_excitation: bool = False)#

Bases: ImmutableLinearMappedUnboundParametricQuantumCircuit

Unitary coupled-cluster singles and doubles (UCCSD) ansatz. The ansatz consists of the exponentials of single excitation and double excitation operator decomposed by first-order Trotter product formula. Note that the ansatz only supports singlet state and the occupied orbitals are the lowest n_fermions spin orbitals. The decomposition using Trotter product formula is executed for each qubit operators obtained by mapping excitation operators.

Parameters:
  • n_spin_orbitals – Number of spin orbitals.

  • n_fermions – Number of fermions.

  • fermion_qubit_mapping – Mapping from FermionOperator to Operator

  • trotter_number – Number for first-order Trotter product formula.

  • use_singles – If True, single-excitation gates are applied.

  • delta_sz – The spin difference of the molecule before and after the transition.

  • singlet_excitation

    If True, the ansatz will be spin symmetric. Parameters for the spin symmetric ansatz are named according to the spatial transition amplitude.

    • For single excitations, parameter named s_i_a denotes the excitation

      from occupied spatial orbital i to virtual spatial orbital a.

    • For double excitations, parameter named d_i_j_a_b denotes the excitation

      from occupied spin orbital (i, ↑), (j, ↓) to virtual spin orbitals (a, ↑), (b, ↓).

Note

Singlets excitation ansatz:

  1. Certain excitation operators will share the same circuit parameters.
    • For single excitation:

      \(c_{a↑}^† c_{i↑}\) and \(c_{a↓}^† c_{i↓}\) share the same transition amplitude \(t_i^a\), thus sharing the same circuit parameter s_i_a.

    • For mixed spin double excitation:
      • \(c_{a↑}^† c_{b↓}^† c_{j↓} c_{i↑}\) and \(c_{a↓}^† c_{b↑}^† c_{j↑} c_{i↓}\) share the same excitaion amplitude \(t_{i↑, j↓}^{a↑, b↓}\), thus sharing the same circuit parameter d_i_j_a_b.

      • All the circuit parameters for double excitation are fixed by

      the mixed spin double excitation mode.

    • For same spin double excitation:

      \(c_{a↑}^† c_{b↑}^† c_{j↑} c_{i↑}\) and \(c_{a↓}^† c_{b↓}^† c_{j↓} c_{i↓}\) share the same excitation amplitude \(t_{i↑, j↓}^{a↑, b↓} - t_{i↓, j↑}^{a↑, b↓}\), where the corresponding parameters d_i_j_a_b and d_i_j_b_a are already added to the circuit when constructing the mixed spin excitation modes.

  2. Parameter count:

    For a system with \(n_o\) occupied spatial orbitals and \(n_v\) virtual spatial orbitals:

    • Single excitations amount for \(n_o n_v\) parameters.

    • Double excitations amount for \(n_o n_v (n_o n_v + 1)/2\) parameters.