Skip to content

Commit

Permalink
Merge pull request #657 from tensorflow/mps_docs
Browse files Browse the repository at this point in the history
Update MPS docs
  • Loading branch information
jaeyoo authored Jan 20, 2022
2 parents 7ff5f20 + bddcad0 commit ee6e703
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tensorflow_quantum/core/ops/math_ops/simulate_mps.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ def mps_1d_expectation(programs,
bond_dim=4):
"""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.
Args:
programs: `tf.Tensor` of strings with shape [batch_size] containing
the string representations of the circuits to be executed.
Expand Down Expand Up @@ -67,7 +72,8 @@ def mps_1d_sample(programs,
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 sample from the final state.
From there we will then sample from the final state. Note that this op
requires 1D non periodic circuits.
Args:
programs: `tf.Tensor` of strings with shape [batch_size] containing
Expand Down Expand Up @@ -109,7 +115,8 @@ def mps_1d_sampled_expectation(programs,
Simulate the final state of `programs` given `symbol_values` are placed
inside of the symbols with the name in `symbol_names` in each circuit.
Them, sample the resulting state `num_samples` times and use these samples
to compute expectation values of the given `pauli_sums`.
to compute expectation values of the given `pauli_sums`. Note that this op
requires 1D non periodic circuits.
Args:
programs: `tf.Tensor` of strings with shape [batch_size] containing
Expand Down

0 comments on commit ee6e703

Please sign in to comment.