Application (paulie.application)#

Visualization#

Utilities for visualizing the anti-commutation graph.

animation.animation_anti_commutation_graph(...)

Generates an animation showing the transformation of the anti-commutation graph into canonical form.

plot.plot_anti_commutation_graph(generators)

Plot a canonical anti-commutation graph of a set of generators.

Average Pauli weight#

Utilities related to average Pauli weights.

average_pauli_weight.average_pauli_weight(o)

Calculates the average Pauli weight (influence) for an operator \(O\).

average_pauli_weight.get_pauli_weights(...)

Generates the weight \(|P|\) for each of the \(4^{\text{number qubits}}\) Pauli operators.

average_pauli_weight.quantum_fourier_entropy(o)

Finds the quantum Fourier entropy of an operator \(O\).

Charges#

Utilities for finding charges.

charges.non_commuting_charges(generators)

Finds the non-commuting charges of a DLA.

Four-point correlation functions#

Utilities for finding four-point correlation functions.

fourpoint.fourpoint(generators, p, q, r, s)

Computes the four-point correlator of Pauli strings \(P\), \(Q\), \(R\), and \(S\).

Optimal \(\mathfrak{su}(2^n)\) generators#

Utilities related to \(\mathfrak{su}(2^n)\) generators.

get_optimal_su2_n.get_optimal_edges_su_2_n(ng)

Get the optimal number of edges in the anticommutation graph for \(\mathfrak{su}(2^{n})\).

get_optimal_su2_n.get_optimal_su_2_n_generators(...)

Get an optimal generator set for \(\mathfrak{su}(2^{n})\).

DLA metrics#

Utilities related to different DLA properties.

average_graph_complexity.average_graph_complexity(...)

Get the average graph complexity of a Pauli string with respect to the time evolution generated by a given generator set.

otoc.average_otoc(generators, v, w)

Finds the Haar averaged out-of-time-order correlator \(F\) between two Pauli strings \(V\) and \(W\).

second_moment.second_moment(operator_m, ...)

Computes the second-order twirl of an operator \(M\) by projecting it onto the subspace of quadratic symmetries of a DLA.

Matrix decomposition#

Utilities related to matrix decompositions.

matrix_decomposition.matrix_decomposition(matrix)

Returns the weight vector corresponding to the Pauli basis decomposition of a matrix.

matrix_decomposition.matrix_decomposition_diagonal(diag)

Returns the weight vector corresponding to the Pauli basis decomposition of a diagonal matrix.

Pauli compiler#

Utilities related to Pauli compilation.

pauli_compiler.OptimalPauliCompiler(cfg)

Compiler implementing the construction from arXiv:2408.03294.

pauli_compiler.PauliCompilerConfig(k_left, ...)

Configuration of the optimal compiler.

pauli_compiler.SubsystemCompiler(cfg)

Compiler for the right subsystem contribution.

pauli_compiler.SubsystemCompilerConfig(...)

Configuration of the subsystem compiler.

pauli_compiler.choose_u_for_b(k)

Choose the fixed left tag used when coupling to right-side generators.

pauli_compiler.compile_target(target, k_left)

Compile a full target Pauli string into a generator sequence.

pauli_compiler.construct_universal_set(...)

Construct the universal generator set used by the compiler.

pauli_compiler.left_a_minimal(k)

Return the minimal left universal set {X_i, Z_i}_i \cup {Z^{\otimes k}}.

pauli_compiler.left_map_over_a(v_from, v_to, ...)

Find a left-only adjoint path from v_from to v_to using BFS.