paulie.application.otoc.mean_abs_otoc_uniform#
- paulie.application.otoc.mean_abs_otoc_uniform(u, *, method='exact', num_samples=10000, seed=None, check_unitary=True, rtol=1e-08, atol=1e-08)#
Uniform expectation of \(\lvert\mathrm{OTOC}(U,P_1,P_2)\rvert\) over independent \(P_1,P_2 \in \{I,X,Y,Z\}^{\otimes n}\) (each uniform on \(4^n\) strings).
\[\mathbb{E}_{P_1,P_2}\left[\left\lvert\mathrm{OTOC}(U, P_1, P_2)\right\rvert\right],\]using the same OTOC convention as
otoc_fixed_unitary().- Parameters:
u – Unitary of shape
(2^n, 2^n).method –
"exact"— sum over all \(16^n\) pairs, allowed only up to a fixed small \(n\) (see error message);"monte_carlo"— sample \(P_1,P_2\) i.i.d. uniform (any \(n\) supported by dense arithmetic).num_samples – Number of i.i.d. pairs for
method="monte_carlo".seed – For
method="monte_carlo", if notNone, callsrandom.seed()before sampling soget_random(stdlibrandom) is reproducible across calls with the sameseed.check_unitary – Forwarded to
otoc_fixed_unitary().rtol – Forwarded to
otoc_fixed_unitary().atol – Forwarded to
otoc_fixed_unitary().
- Returns:
Estimated or exact expectation in \([0,1]\) (typically).
- Raises:
ValueError – Invalid
uormethod, ormethod="exact"with \(n\) above the implemented cap.
Note
This expectation is the quantity inside the logarithm in Pauli instability (Definition~1, arXiv:2408.01663): \(\mathbb{I}(U)=-\log(\cdots)\) uses \(\mathbb{E}|\mathrm{OTOC}|\) exactly in the
"exact"branch and estimates it by an empirical mean in"monte_carlo". Theorem~1 there controls how many samples are needed so thatpauli_instability()withmethod="monte_carlo"is close to \(\mathbb{I}(U)\); Corollary~1 contrasts efficient vs intractable scaling of \(\mathbb{I}(U)\) with system size (\(\Theta(\log n)\) vs \(\Theta(n)\)).