We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8b0406 commit 9431d97Copy full SHA for 9431d97
1 file changed
src/hamiltonian/trotterize.cpp
@@ -29,6 +29,12 @@ void append_trotterize_step(
29
// TODO: Implement the Trotterization for a single step.
30
31
for (auto const& term : hamilt) {
32
+ if (term.coeff() == 0.0) {
33
+ continue;
34
+ }
35
+ if (term.pauli_product().is_identity()) {
36
37
38
prtabl.push_back(
39
PauliRotation(term.pauli_product(),
40
dvlab::Phase(-term.coeff() * dt)));
0 commit comments