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=[c1,c2,...,cn]. Each list ci corresponds to a term in the operator, and consists of k two-tuples: ci = [(A1, s1), (A2, s2), … , (Ak, sk)]. Aj are arrays and sj subsystem indices, corresponds to the k-local term given by the tensor product

A1(s1)A2(s2)Ak(sk).

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

σz1+σz2+2σz3+σx1σx3+σy1σy3+σz1σz3+A2(B+C)3.