Calculation of one site expectation values
- class varipeps.expectation.one_site.One_Site_Expectation_Value(gates: Sequence[jax.Array])
Bases:
Expectation_Model- __call__(peps_tensors: Sequence[Array], unitcell: PEPS_Unit_Cell, *, normalize_by_size: bool = True, only_unique: bool = True) Array | List[Array]
Calculate the expectation value for PEPS unitcell depending on the gates set in the class.
- Parameters:
peps_tensors (sequence of
jax.numpy.ndarray) – The sequence of unique PEPS tensors in the unitcell.unitcell (
PEPS_Unit_Cell) – The PEPS unitcell.spiral_vectors (single or sequence of
jax.numpy.ndarray) – If the expectation value is for a spiral iPEPS ansatz, in this argument the wavevectors are expected.
- Keyword Arguments:
normalize_by_size (
bool, optional) – Flag if the expectation value should be normalized by the number of tensors in the unitcell.Default:Trueonly_unique (
bool, optional) – Flag if the expectation value should be calculated just once for each unique PEPS tensor in the unitcell.Default:True- Returns:
The expectation values for all gates. Single tensor if only one gate is applied.
- Return type:
- varipeps.expectation.one_site.calc_one_site_multi_gates(peps_tensor: Array, peps_tensor_obj: PEPS_Tensor, gates: Sequence[Array]) List[Array]
Calculate the one site expectation values for a PEPS tensor and its environment.
- Parameters:
peps_tensor (
jax.numpy.ndarray) – The PEPS tensor array. Have to be the same object as the tensor attribute of the peps_tensor_obj argument.peps_tensor_obj (
PEPS_Tensor) – PEPS tensor object.gates (sequence of
jax.numpy.ndarray) – Sequence with the gates which should be applied to the PEPS tensor.
- Returns:
List with the calculated expectation values of each gate.
- Return type:
- varipeps.expectation.one_site.calc_one_site_multi_gates_obj(peps_tensor_obj: PEPS_Tensor, gates: Sequence[Array]) List[Array]
Calculate the one site expectation values for a PEPS tensor and its environment.
This function just wraps
calc_one_site_multi_gates.- Parameters:
peps_tensor_obj (
PEPS_Tensor) – PEPS tensor object.gates (sequence of
jax.numpy.ndarray) – Sequence with the gates which should be applied to the PEPS tensor.
- Returns:
List with the calculated expectation values of each gate.
- Return type:
- varipeps.expectation.one_site.calc_one_site_single_gate(peps_tensor: Array, peps_tensor_obj: PEPS_Tensor, gate: Array) Array
Calculate the one site expectation values for a PEPS tensor and its environment.
This function just wraps
calc_one_site_multi_gates.- Parameters:
peps_tensor (
jax.numpy.ndarray) – The PEPS tensor array. Have to be the same object as the tensor attribute of the peps_tensor_obj argument.peps_tensor_obj (
PEPS_Tensor) – PEPS tensor object.gates (
jax.numpy.ndarray) – Gate which should be applied to the PEPS tensor.
- Returns:
Expectation value for the gate.
- Return type:
- varipeps.expectation.one_site.calc_one_site_single_gate_obj(peps_tensor_obj: PEPS_Tensor, gate: Array) Array
Calculate the one site expectation values for a PEPS tensor and its environment.
This function just wraps
calc_one_site_single_gate.- Parameters:
peps_tensor_obj (
PEPS_Tensor) – PEPS tensor object.gates (
jax.numpy.ndarray) – Gate which should be applied to the PEPS tensor.
- Returns:
Expectation value for the gate.
- Return type: