def test_pure_beta_excitation(self, num_excitations, num_spin_orbitals, num_particles, expect):
     """Test disabling alpha-spin excitations."""
     excitations = generate_fermionic_excitations(num_excitations,
                                                  num_spin_orbitals,
                                                  num_particles,
                                                  alpha_spin=False)
     self.assertEqual(excitations, expect)
Beispiel #2
0
 def test_generate_excitations(self, num_excitations, num_spin_orbitals,
                               num_particles, expect):
     """Test standard input arguments."""
     excitations = generate_fermionic_excitations(num_excitations,
                                                  num_spin_orbitals,
                                                  num_particles)
     self.assertEqual(excitations, expect)
 def test_max_spin_excitation(self, num_excitations, num_spin_orbitals, num_particles,
                              max_spin, expect):
     """Test limiting the maximum number of excitations per spin species."""
     excitations = generate_fermionic_excitations(num_excitations,
                                                  num_spin_orbitals,
                                                  num_particles,
                                                  max_spin_excitation=max_spin)
     self.assertEqual(excitations, expect)
 def test_generalized_excitations(self, num_excitations, num_spin_orbitals,
                                  num_particles, expect):
     """Test generalized excitations."""
     excitations = generate_fermionic_excitations(num_excitations,
                                                  num_spin_orbitals,
                                                  num_particles,
                                                  generalized=True)
     self.assertEqual(excitations, expect)
 def test_preserve_spin_excitations(self, num_excitations,
                                    num_spin_orbitals, num_particles,
                                    expect):
     """Test allowing spin-flipped excitations."""
     excitations = generate_fermionic_excitations(num_excitations,
                                                  num_spin_orbitals,
                                                  num_particles,
                                                  preserve_spin=False)
     self.assertEqual(excitations, expect)