From 5f254c54dea96a6b5b5fc44b894bd82137755932 Mon Sep 17 00:00:00 2001 From: Davide Bincoletto Date: Tue, 26 Mar 2024 13:00:06 +0100 Subject: [PATCH 1/2] fix doc in fermionic operators for molecule, now spin-orbital is specified --- src/tequila/quantumchemistry/qc_base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tequila/quantumchemistry/qc_base.py b/src/tequila/quantumchemistry/qc_base.py index 669a3b37..8f6dc293 100644 --- a/src/tequila/quantumchemistry/qc_base.py +++ b/src/tequila/quantumchemistry/qc_base.py @@ -647,7 +647,7 @@ def n_electrons(self) -> int: def make_annihilation_op(self, orbital, coefficient=1.0): """ - Compute annihilation operator on orbital=orbital in qubit representation + Compute annihilation operator on spin-orbital in qubit representation """ assert orbital<=self.n_orbitals*2 aop = openfermion.ops.FermionOperator(f'{orbital}', coefficient) @@ -655,7 +655,7 @@ def make_annihilation_op(self, orbital, coefficient=1.0): def make_creation_op(self, orbital, coefficient=1.0): """ - Compute creation operator on orbital=orbital in qubit representation + Compute creation operator on spin-orbital in qubit representation """ assert orbital<=self.n_orbitals*2 cop = openfermion.ops.FermionOperator(f'{orbital}^', coefficient) @@ -663,7 +663,7 @@ def make_creation_op(self, orbital, coefficient=1.0): def make_number_op(self, orbital): """ - Compute number operator on orbital=orbital in qubit representation + Compute number operator on spin-orbital in qubit representation """ num_op = self.make_creation_op(orbital) * self.make_annihilation_op(orbital) return num_op From 294a5ea803cc2cea8a211a06ce8c74b009ad5d60 Mon Sep 17 00:00:00 2001 From: Davide Bincoletto Date: Tue, 26 Mar 2024 13:12:28 +0100 Subject: [PATCH 2/2] add doc for spin-orbital order --- src/tequila/quantumchemistry/qc_base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tequila/quantumchemistry/qc_base.py b/src/tequila/quantumchemistry/qc_base.py index 8f6dc293..9f089cc4 100644 --- a/src/tequila/quantumchemistry/qc_base.py +++ b/src/tequila/quantumchemistry/qc_base.py @@ -648,6 +648,7 @@ def n_electrons(self) -> int: def make_annihilation_op(self, orbital, coefficient=1.0): """ Compute annihilation operator on spin-orbital in qubit representation + Spin-orbital order is always (up,down,up,down,...) """ assert orbital<=self.n_orbitals*2 aop = openfermion.ops.FermionOperator(f'{orbital}', coefficient) @@ -656,6 +657,7 @@ def make_annihilation_op(self, orbital, coefficient=1.0): def make_creation_op(self, orbital, coefficient=1.0): """ Compute creation operator on spin-orbital in qubit representation + Spin-orbital order is always (up,down,up,down,...) """ assert orbital<=self.n_orbitals*2 cop = openfermion.ops.FermionOperator(f'{orbital}^', coefficient) @@ -664,6 +666,7 @@ def make_creation_op(self, orbital, coefficient=1.0): def make_number_op(self, orbital): """ Compute number operator on spin-orbital in qubit representation + Spin-orbital order is always (up,down,up,down,...) """ num_op = self.make_creation_op(orbital) * self.make_annihilation_op(orbital) return num_op