Skip to content

Commit 2a6f675

Browse files
ikurecicQottmann
andauthored
Small fix for a recent Demo (#1285)
CC @justinpickering , as discussed --------- Co-authored-by: qottmann <[email protected]>
1 parent 71be3c7 commit 2a6f675

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

demonstrations/tutorial_fixed_depth_hamiltonian_simulation_via_cartan_decomposition.metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
}
77
],
88
"dateOfPublication": "2024-12-19T00:00:00+00:00",
9-
"dateOfLastModification": "2024-12-19T00:00:00+00:00",
9+
"dateOfLastModification": "2024-12-20T00:00:00+00:00",
1010
"categories": [
1111
"Quantum Computing",
1212
"Algorithms"

demonstrations/tutorial_fixed_depth_hamiltonian_simulation_via_cartan_decomposition.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@
113113
# It essentially counts whether the number of non-identity Pauli operators in the Pauli word is even or odd.
114114

115115
def even_odd_involution(op):
116-
"""Generalization of EvenOdd to sums of Paulis"""
117116
[pw] = op.pauli_rep
118117
return len(pw) % 2
119118

@@ -433,7 +432,7 @@ def trace_distance(A, B):
433432
# Time evolutions
434433
# ---------------
435434
#
436-
# We compute multiple time evolutions for different times and compare SuzukiTrotter products with the KAK decomposition circuit.
435+
# We compute multiple time evolutions for different times and compare SuzukiTrotter products with the KAK decomposition circuit.
437436
#
438437

439438
ts = jnp.linspace(1., 5., 10)
@@ -468,7 +467,7 @@ def compute_res(Us):
468467

469468

470469
##############################################################################
471-
# We see the expected behavior of SuzukiTrotter product formulas getting worse with an increase in time
470+
# We see the expected behavior of SuzukiTrotter product formulas getting worse with an increase in time
472471
# while the KAK error is constant zero.
473472
#
474473
# The KAK decomposition is particularly well-suited for smaller systems as the circuit depth is equal to the

0 commit comments

Comments
 (0)