# tfq.math.mps_1d_expectation

Calculate the expectation value of circuits wrt some operator(s)

Simulate the final state of `programs` given `symbol_values` are placed inside of the symbols with the name in `symbol_names` in each circuit. From there we will then compute the expectation values of `pauli_sums` on the final states. Note that this op requires 1D non periodic circuits.

`programs` `tf.Tensor` of strings with shape [batch_size] containing the string representations of the circuits to be executed.
`symbol_names` `tf.Tensor` of strings with shape [n_params], which is used to specify the order in which the values in `symbol_values` should be placed inside of the circuits in `programs`.
`symbol_values` `tf.Tensor` of real numbers with shape [batch_size, n_params] specifying parameter values to resolve into the circuits specificed by programs, following the ordering dictated by `symbol_names`.
`pauli_sums` `tf.Tensor` of strings with shape [batch_size, n_ops] containing the string representation of the operators that will be used on all of the circuits in the expectation calculations.
`bond_dim` Integer value used for the bond dimension during simulation.

`tf.Tensor` with shape [batch_size, n_ops] that holds the expectation value for each circuit with each op applied to it (after resolving the corresponding parameters in).

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]
{"lastModified": "Last updated 2024-05-17 UTC."}