ComplexMPO
Base class: Object
Matrix Product Operator (MPO) of Complex values. Compressed representation of large-dimensional tensors, well suited to the representation of quantum operators for 1D many-body physics problems.
Factories
Heisenberg_1d(integer length, complex transverse_field) -> ComplexMPO
Generate the Hamiltonian Matrix Product Operator (MPO) for the 1D Heisenberg model with Complex values.
Parameters
- length: Number of sites in the chain.
- transverse_field: Strength of the transverse field (default: 0).
Returns
MPO representing the 1D Heisenberg Hamiltonian with open boundary conditions.
Ising_1d(integer length, complex transverse_field) -> ComplexMPO
Generate the Hamiltonian Matrix Product Operator (MPO) for the 1D transverse-field Ising model with Complex values.
Parameters
- length: Number of sites in the chain.
- transverse_field: Strength of the transverse field (default: 0).
Returns
MPO representing the transverse-field Ising Hamiltonian with open boundary conditions.
identity_mpo(integer length, integer physical_size) -> ComplexMPO
Generate an identity Matrix Product Operator (MPO) with Complex values.
Parameters
- length: Number of sites in the MPO chain.
- physical_size: Dimension of the physical (input/output) indices at each site.
Returns
An ComplexMPO representing the identity operator on the full Hilbert space.
identity_mpo(integer length, integer physical_size, as_complex as_complex) -> ComplexMPO
Generate an identity Matrix Product Operator (MPO) with Complex values.
Parameters
- length: Number of sites in the MPO chain.
- physical_size: Dimension of the physical (input/output) indices at each site.
- as_complex:
Returns
An ComplexMPO representing the identity operator on the full Hilbert space.
mpo(const Operator operator) -> ComplexMPO
Convert the supplied Operator to a Matrix Product Operator (MPO) with Complex values.
Parameters
- operator: A symbolic quantum operator. :::warning Not all operation are supported at this time :::
Returns
An ComplexMPO representing the supplied symbolic Operator object.
mpo(const Operator operator, integer size) -> ComplexMPO
Convert the supplied symbolic operator to a Matrix Product Operator (MPO) with Complex values.
Parameters
- operator: A symbolic quantum operator. :::warning Not all operation are support at this time :::
- size: number of sites of the resulting mpo.
Returns
An ComplexMPO representing the suplied symbolic Operator object.
mpo(const Operator operator, as_complex type) -> ComplexMPO
Convert the supplied Operator to a Matrix Product Operator (MPO) with Complex values.
Parameters
- operator: A symbolic quantum operator. :::warning Not all operation are supported at this time :::
- type: The type of the tensor to create.
Returns
An ComplexMPO representing the supplied symbolic Operator object.
mpo(const Operator operator, integer size, as_complex as_complex) -> ComplexMPO
Convert the supplied symbolic operator to a Matrix Product Operator (MPO) with Complex values.
Parameters
- operator: A symbolic quantum operator. :::warning Not all operation are support at this time :::
- size: number of sites of the resulting mpo.
- as_complex:
Returns
An ComplexMPO representing the suplied symbolic Operator object.
random_mpo(integer length, integer physical_size, integer bond_size) -> ComplexMPO
Generate a random Matrix Product Operator (MPO) with Complex values.
Parameters
- length: Number of sites in the MPO chain.
- physical_size: Dimension of the physical (input/output) indices at each site.
- bond_size: Maximum bond dimension between adjacent sites.
Returns
A random ComplexMPO with the specified dimensions. Each site tensor has shape [bond_size, physical_size, physical_size, bond_size].
random_mpo(integer length, integer physical_size, integer bond_size, as_complex as_complex) -> ComplexMPO
Generate a random Matrix Product Operator (MPO) with Complex values.
Parameters
- length: Number of sites in the MPO chain.
- physical_size: Dimension of the physical (input/output) indices at each site.
- bond_size: Maximum bond dimension between adjacent sites.
- as_complex:
Returns
A random ComplexMPO with the specified dimensions. Each site tensor has shape [bond_size, physical_size, physical_size, bond_size].
Constructors
ComplexMPO(integer length) -> ComplexMPO
Matrix Product Operator (MPO) of Complex values with the specified number of sites.
Parameters
- length: Number of sites in the MPO chain.
ComplexMPO(const ComplexMPO other) -> ComplexMPO
Copy constructor for Matrix Product Operator (MPO) of Complex values.
Parameters
- other: The MPO to copy.
Symbols
| Name | Description |
|---|---|
* | Compute the exact product of a Matrix Product Operator (MPO) with a Matrix Product State (MPS). Applies the quantum operator represented by the MPO to the quantum state represented by the MPS, yielding a new MPS in the same Hilbert space. Both the MPO and MPS must have the same number of sites and physical dimension. |
*= | In-place product of two Matrix Product Operators (quantum operators) with Complex values. Composes two quantum operators represented as Matrix Product Operators. |
+ | Compute the sum of two Matrix Product Operators (quantum operators) with Complex values. |
+= | In-place addition of two Matrix Product Operators (MPO) with Complex values. |
- | Compute the difference of two Matrix Product Operators (MPO) with Complex values. |
-= | In-place subtraction of two Matrix Product Operators (MPO) with Complex values. |
/ | Scalar division of an Matrix Product Operator (MPO) with Complex values. |
/= | In-place scalar division of an Matrix Product Operator (MPO) with Complex values. |
= | Assignment operator for Matrix Product Operator (MPO) of Complex values. |
[] | Access a specific site tensor in the Matrix Product Operator (MPO) chain by index. Supports negative indexing (e.g., -1 for the last site). |
Members
| Name | Description |
|---|---|
| capacity | Get the current capacity of the Matrix Product Operator (MPO). |
| expval | Compute the expectation value of a quantum operator in state in a Matrix Product State (MPS) encoded state. |
| get_site | Get a copy of the site tensor in the Matrix Product Operator (MPO) at the specified index. |
| matrix | Convert an Matrix Product Operator (MPO) to a full matrix representation. |
| max_bond | Get the maximum bond dimension across all bonds in the MPO chain. |
| open_boundary | Set the Matrix Product Operator (MPO) to open boundary conditions. |
| periodic_boundary | Set the Matrix Product Operator (MPO) to periodic (closed) boundary conditions. |
| push_back | Append a site tensor to the end of the Matrix Product Operator (MPO). |
| reserve | Reserve capacity for the Matrix Product Operator (MPO). Used as system size for otherwise uninitialized mpo operation with Operators |
| resize | Resize a Matrix Product Operator (MPO) to a target size with empty tensors for position beyond the current end of the MPO. |
| set_boundary_like | Copy the boundary conditions from another Matrix Product Operator (MPO) or Matrix Product State (MPS). |
| set_site | Set the site tensor at the specified index in the Matrix Product Operator (MPO). |
| size | Get the number of sites in the MPO. |