Bases#
Trainable sparsifying bases. Circuit bases (QFT, entangled QFT, TEBD, MERA, Rich, RealRich, DCT-IV) act on a whole 2^m x 2^n image; BlockedBasis tiles an inner basis over image blocks. Every circuit basis is a CircuitBasis: a gate program and the tensors of its gates. The *_code helpers return a family’s applier and initial tensors; ft_mat and ift_mat apply one to an image.
Sparse-basis subpackage.
Every name is importable from here. Where things live:
bases.core— what every basis shares: CircuitBasis, the transforms, bases_allclose, with_tensors and the parameter views (ParameterView).bases.base— the QFT, EntangledQFT, TEBD, MERA and DCT4 classes.bases.circuit— one module per circuit family with its gate emitter (<family>_gates); the Rich and RealRich classes; freeze_as_blocked.bases.block— BlockedBasis, an inner basis tiled over image blocks.
Contents
QFT tensor-network basis. |
|
QFT with an entanglement layer on |
|
2D TEBD basis with row + column rings of controlled-phase gates. |
|
2D MERA basis. |
|
DCT-IV tensor-network basis: the real-orthogonal, ancilla-free analogue of |
|
QFT topology with H + learnable U(4) gates instead of H + CP. |
|
QFT topology with H + real-orthogonal 2-qubit gates. |
|
Wraps an inner parametric basis as a within-block transform. |
|
A basis that is a gate circuit on |
|
Structural interface shared by every basis: an |
|
Return |
|
Fit a parametric basis so its forward circuit ≈ DCT_2D. |
|
Semantic equality across any of the registered basis types. |
|
The gate program of a basis; for a blocked basis, the one of the circuit it tiles. |
|
A copy of |
|
The angle of every controlled-phase gate, in stored order: the phase-only parameters. |
|
A copy of |
|
The four phases of every controlled-phase tensor, in stored order: shape |
|
A copy of |
|
What a trainer moves in place of a basis's tensors. |
|
What a trainer moves in place of a basis's tensors. |
|
What a trainer moves in place of a basis's tensors. |
|
What a trainer moves in place of a basis's tensors. |
|
Return |
|
Return |
|
Return |
|
Return |
|
Return |
|
Apply |
|
Apply |