pdft.bases.TEBDBasis#
- class pdft.bases.TEBDBasis(m, n, tensors=None, phases=None, code=None, inv_code=None, seed=None, parametrization='cp')[source]#
Bases:
_LayeredBasis2D TEBD basis with row + column rings of controlled-phase gates.
Mirror of upstream src/basis.jl:600-745.
- Parameters:
- __init__(m, n, tensors=None, phases=None, code=None, inv_code=None, seed=None, parametrization='cp')#
A
seedwithoutphasesdraws one phase per gate of the two layers.parametrizationis “cp” (diagonal gates on U(1)^4) or “u4” (dense two-qubit gates on U(4), the canonical form of both circuits).
Methods
__init__(m, n[, tensors, phases, code, ...])A
seedwithoutphasesdraws one phase per gate of the two layers.forward_transform(pic)gates_per_register(n_qubits)Number of gates in the ring of one register: one per qubit, the wrap-around included.
inverse_transform(pic)conj(tensors)throughinv_code, exactly like Julia'sbasis.inverse_code(conj.(basis.tensors)..., ...).layered(m, n, *[, phases, parametrization])Return
(gates, n_row_gates, n_col_gates).Attributes
freezes_to_blockedimage_sizeinv_tensorsThe tensor list itself.
num_parametersn_row_gatesn_col_gatesmntensorsprogramcodeinv_codeemit- static layered(m, n, *, phases=None, parametrization='cp')#
Return
(gates, n_row_gates, n_col_gates).Mirror of upstream src/tebd.jl:48-110.
- The circuit is:
H on each of the m+n qubits.
Row ring: ring gate (i, i+1) for i=1..m-1, then wrap-around (m, 1).
Col ring: ring gate (m+i, m+i+1) for i=1..n-1, then wrap-around (m+n, m+1).
parametrizationis"cp"(diagonal,U(1)^4) or"u4"(dense two-qubit,U(4)— the canonical TEBD gate). Both start from the same operator for a givenphases; see the module docstring.Step 1, the split of
phasesbetween the two rings and the choice of gate form arehadamards_then_layers, which MERA uses too. What is TEBD’s own is the ring of one register,_ring.