Merge branch 'doc-fix' of https://github.com/qiboteam/qibotn into doc-fix
This commit is contained in:
@@ -7,7 +7,7 @@ class MPSContractionHelper:
|
||||
"""A helper class to compute various quantities for a given MPS.
|
||||
|
||||
Interleaved format is used to construct the input args for `cuquantum.contract`.
|
||||
|
||||
|
||||
Reference: https://github.com/NVIDIA/cuQuantum/blob/main/python/samples/cutensornet/tn_algorithms/mps_algorithms.ipynb
|
||||
|
||||
The following compute quantities are supported:
|
||||
|
||||
@@ -3,9 +3,8 @@ from cuquantum import contract
|
||||
from cuquantum.cutensornet.experimental import contract_decompose
|
||||
|
||||
|
||||
|
||||
def initial(num_qubits, dtype):
|
||||
"""Generate the MPS with an initial state of :math:`\ket{00...00}`"""
|
||||
r"""Generate the MPS with an initial state of :math:`\ket{00...00}`"""
|
||||
state_tensor = cp.asarray([1, 0], dtype=dtype).reshape(1, 2, 1)
|
||||
mps_tensors = [state_tensor] * num_qubits
|
||||
return mps_tensors
|
||||
@@ -26,9 +25,9 @@ def mps_site_right_swap(mps_tensors, i, **kwargs):
|
||||
|
||||
def apply_gate(mps_tensors, gate, qubits, **kwargs):
|
||||
"""Apply the gate operand to the MPS tensors in-place.
|
||||
|
||||
|
||||
# Reference: https://github.com/NVIDIA/cuQuantum/blob/main/python/samples/cutensornet/tn_algorithms/mps_algorithms.ipynb
|
||||
|
||||
|
||||
Args:
|
||||
mps_tensors: A list of rank-3 ndarray-like tensor objects.
|
||||
The indices of the ith tensor are expected to be the bonding index to the i-1 tensor,
|
||||
|
||||
Reference in New Issue
Block a user