Function Repository Resource:

 SuzukiTrotterProduct

Source Notebook

Construct Suzuki–Trotter products and analyze scaling, leading commutators and matrix realizations

Contributed by: Mads Bahrami

ResourceFunction["SuzukiTrotterProduct"][{A1,…,Am},p,n,t]

constructs the order-p Suzuki-Trotter product (Sp(t/n))n, which approximates using n equal time steps on.

Details and Options

ResourceFunction["SuzukiTrotterProduct"][ops, p, n, t] takes the following arguments as input:
{A1,…,Am} is a list of generally noncommuting formal expressions or square matrices.
A single call must use one representation throughout, and matrix operators must have the same dimensions.
p is the formula order and must be 1 or a positive even integer. The value 1 selects the Lie-Trotter formula, 2 selects the symmetric Strang formula and 4, 6, … select successive levels of Suzuki's five-block recursion.
n is the positive integer number of equal product-formula steps.
t is the finite commuting scalar giving the total evolution time. It may be numeric, symbolic or an arithmetic expression composed from scalar arguments. The target is . For quantum time evolution , multiply ops by -I before passing it.
For one step of duration h, define the first-order product and its reversed product by
The symmetric second-order formula and the higher even-order recursion are
Dividing the total time t into n equal steps gives h=t/n. The "Product" entry of the returned association represents
In the example captions, Sp(h) always denotes the one-step product built from the ordered ops list in the displayed call; it is not an additional argument.
In particular, p=1 gives the full Lie-Trotter approximation
After merging its two adjacent Am factors, p=2 gives the full symmetric approximation
Therefore, for ResourceFunction["SuzukiTrotterProduct"][{A, B}, 2, n, t], the "Product" entry is
The function has the following options:
"LeadingError"Noneuse None to return no leading generator, "Operator" to also return the exact generic degree-(p+1) Lie polynomial in "LeadingErrorOperator", or "Matrix" to also return its direct matrix-series value in "LeadingErrorMatrix"; exact matrix arithmetic is limited to orders through 4, while inexact matrices support higher orders
"MaxErrorWords"100skip a requested "LeadingErrorOperator" calculation when the free-word carrier mp+1 exceeds this positive-integer limit; it does not limit "LeadingErrorMatrix"
"MaxFactors"100000reject a product before recursive expansion when its predicted merged factor count exceeds this positive-integer limit
The result is an Association with the following always-present keys and, depending on "LeadingError", one of two optional leading-error keys:
KeyMeaning
"Target"The inactive exact exponential being approximated, represented by Inactive[Exp] for formal operators or Inactive[MatrixExp] for matrices.
"Order"The requested product-formula order p.
"Repetitions"The number n of equal time steps.
"Coefficients"The scalar coefficients ck in the ordered exponents ckAjk.
"OperatorIndices"The one-based indices jk selecting operators from the input list.
"Exponents"The ordered exponent list {c1Aj1,c2Aj2,…}.
"Factors"The corresponding inactive exponentials {ec1Aj1,ec2Aj2,…}, using Inactive[Exp] or Inactive[MatrixExp] according to the input representation.
"Product"The inactive left-to-right product of "Factors", using Inactive[NonCommutativeMultiply] for formal operators or Inactive[Dot] for matrices.
"FactorCount"The number of factors after exact merging of adjacent terms with the same input-operator index.
"ErrorScale"The coefficient-free local scale hp+1 and fixed-time global scale thp, where h=t/n. Both values are zero for one operator.
"LeadingErrorOperator"The optional canonical symbolic leading logarithmic generator requested by "LeadingError" → "Operator".
"LeadingErrorMatrix"The optional directly computed leading logarithmic matrix generator requested by "LeadingError" → "Matrix".
"MatrixProduct"The evaluated product matrix for compatible numeric matrix inputs; Missing["NotComputable"] when the inputs are not numeric, or Missing["ExactArithmeticLimit"] for a guarded noncommuting exact calculation above order 2.
For multiple operators, "ErrorScale" is <|"Local" → (t/n)^(p+1), "Global" → t (t/n)^p|>. These are the coefficient-free factors in 𝒪(hp+1) and 𝒪(thp), not error norms, bounds or leading coefficients.
A computed or exact "LeadingErrorOperator" association has the following keys:
KeyMeaning
"Status""Computed" when the generator was obtained or "Exact" when the input list contains one operator and the product is exact.
"Generator"The leading logarithmic-error coefficient Cp+1 as an exact Lie polynomial in the standard Lyndon basis, or zero when the product is exact.
A skipped "LeadingErrorOperator" calculation instead has the following keys:
KeyMeaning
"Status""Skipped".
"Reason"The reason the calculation was skipped, normally "WordLimitExceeded".
"RequiredWordCount"The conservative free-word carrier size mp+1 used for the budget check.
"MaximumWordCount"The maximum permitted by "MaxErrorWords".
A computed or exact "LeadingErrorMatrix" association has the following keys:
KeyMeaning
"Status""Computed" when the matrix generator was obtained or "Exact" when the input list contains one matrix and the product is exact.
"Generator"The matrix representation of the leading logarithmic-error coefficient Cp+1, or the zero matrix when the product is exact.
A skipped exact-arithmetic "LeadingErrorMatrix" calculation instead has the following keys:
KeyMeaning
"Status""Skipped".
"Reason""ExactArithmeticLimit".
"RequestedOrder"The requested order p>4.
"MaximumExactOrder"The largest order, currently 4, evaluated directly with exact matrix-series arithmetic.
"Exponents" gives the requested list {a1,a2,…}. "Factors" gives {ea1,ea2,…} as inactive exponentials, and "Product" gives their inactive product ea1ea2⋯ in mathematical multiplication order. Activating a matrix result uses MatrixExp and Dot, not entry-wise exponentiation and multiplication.
The rightmost factor in "Product" acts first on a column vector. "Factors" is not a circuit-application sequence.
Adjacent exponentials carrying the same input-operator index are merged exactly. For example, the two boundary terms indexed by B combine as ehB/2ehB/2=ehB. Structurally identical expressions supplied at different list positions remain distinct. This produces the standard three-factor Strang formula and the standard eleven-factor fourth-order formula for two operator positions.
For , the generic logarithmic error has the form
where each Lα is a degree-(p+1) nested commutator. The power of h gives the nominal order; the Lie polynomial Cp+1 gives its operator-valued coefficient.
For the Strang product ehA/2ehBehA/2, the exact nominal generator is
With h=t/n, bounded operators and a generic nonzero Cp+1 give a one-step local defect 𝒪(hp+1) and a fixed-time global defect 𝒪(thp)=𝒪(tp+1/np). The coefficient-free scales are not norm values.
For one input operator the product is exact, and "ErrorScale" is <|"Local" → 0, "Global" → 0|>.
With "LeadingError" → "Operator", "LeadingErrorOperator" gives the generic degree-(p+1) coefficient in the free algebra on the input positions. It is not guaranteed to be the first nonzero term after operator-specific identities are imposed. If the displayed Cp+1 vanishes for the supplied operators, the realized order is higher and this mode does not search for the next nonzero degree.
Multiplying "Generator" by the "Local" value of "ErrorScale" gives the nominal local logarithmic term hp+1Cp+1. Multiplying it by the "Global" value gives the nominal repeated-product exponent term thpCp+1. The latter is not generally the leading global propagator difference, which is dressed by the exact evolution:
With "LeadingError" → "Operator", the function expands words in the free algebra and converts the homogeneous coefficient to the documented canonical nested-commutator form. A call-local cache accelerates recursive Lyndon bracketing and is discarded after the result is built. The degree-(p+1) carrier has at most mp+1 words; "RequiredWordCount" reports this size. If it exceeds "MaxErrorWords", "LeadingErrorOperator" has status "Skipped" with reason "WordLimitExceeded".
With "LeadingError" → "Matrix", the function multiplies truncated matrix power series for the exponential factors, forms the truncated logarithm and extracts its degree-(p+1) coefficient directly in "LeadingErrorMatrix". This route neither constructs free words nor produces a nested-commutator decomposition. Exact matrix input is evaluated through order 4; at higher orders the result is skipped before algebraic expression growth becomes excessive. Apply N at the desired precision to request the higher-order direct calculation. Use "Operator" when the symbolic commutator formula itself is required.
When every element of ops is a numeric square matrix of the same dimensions and t is numeric, "MatrixProduct" evaluates the ordered factors using MatrixExp. For noncommuting exact matrices above order 2, it instead returns Missing["ExactArithmeticLimit"]; exact pairwise-commuting matrices use their mathematically identical single-exponential result. Apply N at the desired precision to evaluate a guarded higher-order product. Non-numeric inputs give Missing["NotComputable"]. The function does not otherwise evaluate the exact reference MatrixExp[tTotal[ops]] or choose a norm for comparing it with the product.
For m>1, the merged factor count is mn at order 1 and 2n(m-1)5p/2-1+1 at even order p. For one operator, every supported order and repetition count is constructed directly as one exact factor, without materializing n identical steps.
The factor count is checked against "MaxFactors" before recursive terms are constructed. For even order, let e=p/2-1 and M=⌊(L-1)/(2n(m-1))⌋, where L is the factor limit. The exact acceptance condition 5e≤M is implemented as M>=1&&e<IntegerLength[M,5]; these conditions are equivalent for integer e≥0, while the digit-length form avoids constructing an enormous value of 5e merely to reject the call. If the budget is exceeded, the call returns $Failed with a message. Increase the limit deliberately only when materializing the complete coefficient, exponent and factor lists is intended.
Higher even orders contain negative coefficients because 1-4qp<0 for p≥4.
The asymptotic statements assume a common invariant domain and bounded nested commutators. Unbounded operators require separate domain and stability analysis.

Examples

Basic Examples (5) 

Construct the complete second-order result for exp (t(a+b))≈S2(t):

In[1]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t]
Out[1]=

Construct the complete second-order result for exp (t(a+b))≈(S2(t/3))3:

In[2]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 3, t]
Out[2]=

Construct the complete first-order result for exp (t(a+b+c))≈(S1(t/2))2:

In[3]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b, c}, 1, 2, t]
Out[3]=

Construct the complete fourth-order result for exp (t(a+b))≈S4(t), including its recursive coefficients and error scales:

In[4]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 4, 1, t]
Out[4]=

Construct the complete matrix result for exp (-i(X+Z)/10)≈(S2(1/20))2:

In[5]:=
ResourceFunction[
 "SuzukiTrotterProduct"][-I {PauliMatrix[1], PauliMatrix[3]}, 2, 2, .1]
Out[5]=

Scope (4) 

Compare the computational cost and error scales of the recursively generated formulas exp (t(a+b))≈(Sp(t/2))2 for p∈{6,8}:

In[6]:=
AssociationMap[
 KeyTake[ResourceFunction["SuzukiTrotterProduct"][{a, b}, #, 2, t], {"FactorCount", "ErrorScale"}] &, {6, 8}]
Out[6]=

Approximate the two-qubit transverse-field Ising evolution exp (-0.5i(Z⊗Z+0.7X⊗I2+0.7I2⊗X))≈(S4(0.5/12))12:

In[7]:=
With[{x = PauliMatrix[1], z = PauliMatrix[3], id = IdentityMatrix[2]}, ResourceFunction[
   "SuzukiTrotterProduct"][-I {KroneckerProduct[z, z], 0.7 KroneckerProduct[x, id], 0.7 KroneckerProduct[id, x]}, 4, 12, 0.5]["MatrixProduct"]]
Out[7]=

Approximate the three-level evolution exp (-0.2i(H1+H2))≈(S6(0.2/5))5 for the noncommuting matrices defined in the input:

In[8]:=
With[{h1 = {{0, 1, 0}, {1, 0, 1}, {0, 1, 0}}, h2 = DiagonalMatrix[{1, 0, -1}]}, ResourceFunction["SuzukiTrotterProduct"][-I {h1, h2}, 6, 5, 0.2][
  "MatrixProduct"]]
Out[8]=

Approximate the nonunitary evolution exp (A+B)≈(S2(1/20))20 for two Markov generators and confirm that the resulting transition matrix has unit row sums:

In[9]:=
With[{generators = N @ {{{-1, 1}, {0, 0}}, {{0, 0}, {1, -1}}}}, With[{approximation = ResourceFunction["SuzukiTrotterProduct"][generators, 2, 20, 1.][
     "MatrixProduct"]}, <|"MatrixProduct" -> approximation, "RowSums" -> Total /@ approximation|>]]
Out[9]=

Options (4) 

LeadingError (2) 

Return the canonical leading logarithmic error generator for exp (t(a+b))≈S2(t):

In[10]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t, "LeadingError" -> "Operator"]["LeadingErrorOperator"]
Out[10]=

Compute the same nominal generator directly for exp (-it(X+Z))≈S2(t) without constructing symbolic free words:

In[11]:=
ResourceFunction[
  "SuzukiTrotterProduct"][-I {PauliMatrix[1], PauliMatrix[3]}, 2, 1, t, "LeadingError" -> "Matrix"]["LeadingErrorMatrix"]
Out[11]=

MaxErrorWords (1) 

Skip the leading-operator calculation for exp (t(a+b))≈S4(t) when its required free words exceed the specified limit:

In[12]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 4, 1, t, "LeadingError" -> "Operator", "MaxErrorWords" -> 10]["LeadingErrorOperator"]
Out[12]=

MaxFactors (1) 

Allow explicit construction of all 6251 merged factors in the twelfth-order product exp (t(a+b))≈S12(t):

In[13]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 12, 1, t, "MaxFactors" -> 7000]["FactorCount"]
Out[13]=

Applications (1) 

Evaluate exp (-0.7i(X+Z))≈(S4(0.7/8))8 and return its exact reference and Frobenius error:

In[14]:=
With[{operators = -I {PauliMatrix[1], PauliMatrix[3]}, time = 0.7}, With[{approximate = ResourceFunction["SuzukiTrotterProduct"][operators, 4, 8, time][
     "MatrixProduct"], exact = MatrixExp[time Total[operators]]}, <|
   "Approximate" -> approximate, "Exact" -> exact, "FrobeniusError" -> Norm[approximate - exact, "Frobenius"]|>]]
Out[14]=

Properties and Relations (10) 

Confirm that the coefficients assigned to each operator sum to t in exp (t(a+b+c))≈(S6(t/3))3:

In[15]:=
With[{result = ResourceFunction["SuzukiTrotterProduct"][{a, b, c}, 6, 3, t]}, Map[FullSimplify, GroupBy[Transpose @ Lookup[result, {"OperatorIndices", "Coefficients"}], First -> Last, Total]]]
Out[15]=

After adjacent factors involving the same operator have been combined, confirm that the factor counts for exp (t(a+b+c))≈(Sp(t/2))2 are 6, 9, 41 and 201 at orders 1, 2, 4 and 6, respectively; each returned row has the form {order, computed count, predicted count}:

In[16]:=
With[{m = 3, repetitions = 2}, Table[{order, ResourceFunction["SuzukiTrotterProduct"][{a, b, c}, order, repetitions, t]["FactorCount"], If[order === 1, m repetitions, 2 repetitions (m - 1) 5 ^ (order / 2 - 1) + 1]}, {order, {1, 2, 4, 6}}]]
Out[16]=

Confirm that each even-order composition is symmetric by reversing both its coefficient list and its operator-index list in exp (t(a+b+c))≈(Sp(t/2))2 for p∈{2,4,6}:

In[17]:=
Table[With[{data = Lookup[ResourceFunction["SuzukiTrotterProduct"][{a, b, c}, order, 2, t], {"Coefficients", "OperatorIndices"}]}, SameQ[data, Reverse /@ data]], {order, {2, 4, 6}}]
Out[17]=

Show that the first-order approximation depends on operator ordering by returning {etaetb,etbeta} for the two products and , which have the same target exp (t(a+b)) but are generally unequal when[a,b]≠0:

In[18]:=
{ResourceFunction["SuzukiTrotterProduct"][{a, b}, 1, 1, t]["Product"], ResourceFunction["SuzukiTrotterProduct"][{b, a}, 1, 1, t]["Product"]}
Out[18]=

Confirm that the leading logarithmic error generator for exp (t(a+b))≈S2(t) is C3=-[a,[a,b]]/24+[[a,b],b]/12:

In[19]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t, "LeadingError" -> "Operator"]["LeadingErrorOperator", "Generator"]
Out[19]=

Confirm that evaluating the symbolic C3 on the Pauli matrices X and Z agrees entry-wise with the generator computed directly from matrix power series for exp (-it(X+Z))≈S2(t):

In[20]:=
With[{operators = -I {PauliMatrix[1], PauliMatrix[3]}}, With[{symbolic = ResourceFunction["SuzukiTrotterProduct"][operators, 2, 1, t, "LeadingError" -> "Operator"]["LeadingErrorOperator", "Generator"], direct = ResourceFunction["SuzukiTrotterProduct"][operators, 2, 1, t, "LeadingError" -> "Matrix"]["LeadingErrorMatrix", "Generator"]}, With[{matrix = symbolic //. Inactive[Commutator][left_, right_] :> left . right - right . left}, And @@ MapThread[
     TrueQ @ FullSimplify[#1 == #2] &, {Flatten[matrix], Flatten[direct]}]]]]
Out[20]=

For each p∈{1,2,4,6}, compare the Frobenius errors at n=16 and n=32 in exp (-0.7i(X+Z))≈(Sp(0.7/n))n and confirm E16/E32≈2p; the expected rows are approximately {{1, 2, 2}, {2, 4, 4}, {4, 16, 16}, {6, 64, 64}}:

In[21]:=
With[{operators = N[-I {PauliMatrix[1], PauliMatrix[3]}, 80], time = N[7 / 10, 80]}, Table[With[{exact = MatrixExp[time Total[operators]], coarse = ResourceFunction["SuzukiTrotterProduct"][operators, order, 16, time]["MatrixProduct"], fine = ResourceFunction["SuzukiTrotterProduct"][operators, order, 32, time]["MatrixProduct"]}, {order, Norm[coarse - exact, "Frobenius"] / Norm[fine - exact, "Frobenius"], 2 ^ order}], {order, {1, 2, 4, 6}}]]
Out[21]=

Because the matrices H1 and H2 are diagonal and commute, confirm that exp (-7i(H1+H2)/10)=(S6(7/30))3 exactly by returning a Frobenius difference norm of 0:

In[22]:=
With[{h1 = DiagonalMatrix[{1, 2}], h2 = DiagonalMatrix[{3, 5}], time = 7 / 10}, With[{operators = -I {h1, h2}}, FullSimplify @ Norm[ResourceFunction["SuzukiTrotterProduct"][operators, 6, 3, time]["MatrixProduct"] - MatrixExp[time Total[operators]], "Frobenius"]]]
Out[22]=

For the X+Z splitting, confirm that zero total time makes every exponential factor the identity, so exp (0)=(S4(0))3=I2:

In[23]:=
ResourceFunction[
   "SuzukiTrotterProduct"][-I {PauliMatrix[1], PauliMatrix[3]}, 4, 3, 0]["MatrixProduct"] // Normal
Out[23]=

Confirm that splitting a single operator introduces no approximation for the sampled orders and repetition counts, so every result for exp (ta)=(Sp(t/n))n is {1,Exp[ta],<|"Local"→0,"Global"→0|>} for factor count, product and error scale:

In[24]:=
Table[Lookup[
  ResourceFunction["SuzukiTrotterProduct"][{a}, order, repetitions, t], {"FactorCount", "Product", "ErrorScale"}], {order, {1, 2, 4, 6}}, {repetitions, {1, 3}}]
Out[24]=

Possible Issues (13) 

An empty operator list has no target:

In[25]:=
ResourceFunction["SuzukiTrotterProduct"][{}, 2, 1, t]
Out[25]=

Supply a nonempty operator list to construct, for example, exp (t(a+b))≈S2(t):

In[26]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t]
Out[26]=

The unsupported order p=3 is neither first order nor a positive even order:

In[27]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 3, 1, t]
Out[27]=

Use the valid order p=4 to construct exp (t(a+b))≈S4(t):

In[28]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 4, 1, t]
Out[28]=

Zero repetitions do not define a time step:

In[29]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 0, t]
Out[29]=

Use n=2 to construct exp (t(a+b))≈(S2(t/2))2:

In[30]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 2, t]
Out[30]=

A list-valued time is not a commuting scalar:

In[31]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, {t1, t2}]
Out[31]=

Use the commuting scalar t to construct exp (t(a+b))≈S2(t):

In[32]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t]
Out[32]=

The value "Norm" is not a valid "LeadingError" mode:

In[33]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t, "LeadingError" -> "Norm"]
Out[33]=

Use "Operator" to request the symbolic leading generator for exp (t(a+b))≈S2(t):

In[34]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t, "LeadingError" -> "Operator"]
Out[34]=

A zero "MaxErrorWords" budget is invalid:

In[35]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t, "MaxErrorWords" -> 0]
Out[35]=

Use a positive "MaxErrorWords" budget to analyze exp (t(a+b))≈S2(t):

In[36]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t, "LeadingError" -> "Operator", "MaxErrorWords" -> 100]
Out[36]=

A zero "MaxFactors" budget is invalid:

In[37]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t, "MaxFactors" -> 0]
Out[37]=

Use a positive "MaxFactors" budget that admits the three-factor Strang product:

In[38]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t, "MaxFactors" -> 3]
Out[38]=

The misspelled option "LeadingErorr" is unknown:

In[39]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t, "LeadingErorr" -> "Operator"]
Out[39]=

Spell the documented "LeadingError" option correctly:

In[40]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t, "LeadingError" -> "Operator"]
Out[40]=

The "Matrix" leading-error mode cannot operate on formal symbols:

In[41]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t, "LeadingError" -> "Matrix"]
Out[41]=

Use "Operator" for the formal relation exp (t(a+b))≈S2(t):

In[42]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t, "LeadingError" -> "Operator"]
Out[42]=

Mixing a concrete matrix with a formal operator gives incompatible multiplication representations:

In[43]:=
ResourceFunction["SuzukiTrotterProduct"][{PauliMatrix[1], a}, 2, 1, t]
Out[43]=

Use formal operators consistently throughout the call:

In[44]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 2, 1, t]
Out[44]=

Matrices with different dimensions cannot occur in one product:

In[45]:=
ResourceFunction[
 "SuzukiTrotterProduct"][{IdentityMatrix[2], IdentityMatrix[3]}, 2, 1, 1]
Out[45]=

Use matrices with common dimensions to construct, for example, exp (I2+Z)=S2(1):

In[46]:=
ResourceFunction[
 "SuzukiTrotterProduct"][{IdentityMatrix[2], PauliMatrix[3]}, 2, 1, 1]
Out[46]=

Exact noncommuting sixth-order inputs return guarded matrix results before algebraic expressions grow prohibitively:

In[47]:=
With[{operators = -I {PauliMatrix[1], PauliMatrix[3]}}, KeyTake[ResourceFunction["SuzukiTrotterProduct"][operators, 6, 1, 1, "LeadingError" -> "Matrix"], {"MatrixProduct", "LeadingErrorMatrix"}]]
Out[47]=

Convert the matrices to the desired precision before requesting the sixth-order evaluated product and coefficient:

In[48]:=
With[{operators = N[-I {PauliMatrix[1], PauliMatrix[3]}, 50]}, KeyTake[ResourceFunction["SuzukiTrotterProduct"][operators, 6, 1, 1, "LeadingError" -> "Matrix"], {"MatrixProduct", "LeadingErrorMatrix"}]]
Out[48]=

Higher orders grow quickly; compare the factor counts in exp (t(a+b))≈Sp(t) through p=10:

In[49]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, #, 1, t][
   "FactorCount"] & /@ {2, 4, 6, 8, 10}
Out[49]=

A deliberately small factor budget rejects a twelfth-order product before recursive expansion:

In[50]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 12, 1, t, "MaxFactors" -> 1000]
Out[50]=

Raise the factor budget only when the complete 6251-factor output is needed:

In[51]:=
ResourceFunction["SuzukiTrotterProduct"][{a, b}, 12, 1, t, "MaxFactors" -> 7000]["FactorCount"]
Out[51]=

Publisher

Mads Bahrami

Version History

  • 1.0.0 – 24 August 2026

Source Metadata

Related Resources

License Information