qit.utils.op_list

qit.utils.op_list(G, dim)

Operator consisting of k-local terms, given as a list.

Parameters
  • G (list[list[tuple]]) – list of k-local operator terms

  • dim (Sequence[int]) – vector of subsystem dimensions

Returns

matrix defined by G

Return type

array[complex]

G is a list of lists, \(G = [c_1, c_2, ..., c_n]\). Each list \(c_i\) corresponds to a term in the operator, and consists of k two-tuples: \(c_i\) = [(A1, s1), (A2, s2), … , (Ak, sk)]. Aj are arrays and sj subsystem indices, corresponds to the k-local term given by the tensor product

\[A_1^{(s_1)} A_2^{(s_2)} \cdots A_k^{(s_k)}.\]

The dimensions of all operators acting on subsystem sj must match dim[sj].

Alternatively one can think of G as defining a hypergraph, where each subsystem corresponds to a vertex and each array c_i in the list describes a hyperedge connecting the vertices {s1, s2, …, sk}.

Example: The connection list

::

G = [[(sz,1)], [(sx,1), (sx,3)], [(sy,1), (sy,3)], [(sz,1), (sz,3)], [(sz,2)], [(A,2), (B+C,3)], [(2*sz,3)]]

corresponds to the operator

\[\sigma_{z1} +\sigma_{z2} +2 \sigma_{z3} +\sigma_{x1} \sigma_{x3} +\sigma_{y1} \sigma_{y3} +\sigma_{z1} \sigma_{z3} +A_2 (B+C)_3.\]