pdft.bases.tebd_code

Contents

pdft.bases.tebd_code#

pdft.bases.tebd_code(m, n, *, phases=None, inverse=False, parametrization='cp')[source]#

Return (einsum_fn, initial_tensors, n_row_gates, n_col_gates).

Mirror of upstream src/tebd.jl:48-110.

The circuit is:
  1. H on each of the m+n qubits.

  2. Row ring: ring gate (i, i+1) for i=1..m-1, then wrap-around (m, 1).

  3. Col ring: ring gate (m+i, m+i+1) for i=1..n-1, then wrap-around (m+n, m+1).

parametrization is "cp" (diagonal, U(1)^4) or "u4" (dense two-qubit, U(4) — the canonical TEBD gate). Both start from the same operator for a given phases; see the module docstring.

Parameters:
Return type:

tuple[Callable[[…], Array], list[Array], int, int]