From 109ed03362ccf457f68dd8edf744deb9a5a64182 Mon Sep 17 00:00:00 2001 From: MichaelBroughton Date: Fri, 4 Jun 2021 12:35:05 -0700 Subject: [PATCH] Cleaned up latex and docs rendering. (#585) --- scripts/build_docs.py | 5 +++++ tensorflow_quantum/core/ops/math_ops/fidelity_op.py | 4 ++-- tensorflow_quantum/core/ops/math_ops/inner_product_op.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/build_docs.py b/scripts/build_docs.py index 2a4cdf9c3..81b4b46ea 100644 --- a/scripts/build_docs.py +++ b/scripts/build_docs.py @@ -73,6 +73,11 @@ def main(unused_argv): "check_commutability", "kwargs_cartesian_product", "random_circuit_resolver_batch", "random_pauli_sums", "random_symbol_circuit", "random_symbol_circuit_resolver_batch" + ], + "tfq.math": ["fidelity_op", "inner_product_op"], + "tfq.noise": [ + "noisy_expectation_op", "noisy_sampled_expectation_op", + "noisy_samples_op" ] }) diff --git a/tensorflow_quantum/core/ops/math_ops/fidelity_op.py b/tensorflow_quantum/core/ops/math_ops/fidelity_op.py index 20a7fc17c..0bbe691fe 100644 --- a/tensorflow_quantum/core/ops/math_ops/fidelity_op.py +++ b/tensorflow_quantum/core/ops/math_ops/fidelity_op.py @@ -25,8 +25,8 @@ def fidelity(programs, symbol_names, symbol_values, other_programs): the symbol free comparison circuits. Calculates out[i][j] = $ | \langle \psi_{\text{programs[i]}} \\ - (\text{symbol_values[i]}) | \psi_{\text{other_programs[j]}} \rangle \\ - |^2 $ + (\text{symbol\_values[i]}) | \psi_{\text{other\_programs[j]}} \rangle \\ + |^2 $ >>> symbols = sympy.symbols('alpha beta') diff --git a/tensorflow_quantum/core/ops/math_ops/inner_product_op.py b/tensorflow_quantum/core/ops/math_ops/inner_product_op.py index 17675e978..5d92b7b92 100644 --- a/tensorflow_quantum/core/ops/math_ops/inner_product_op.py +++ b/tensorflow_quantum/core/ops/math_ops/inner_product_op.py @@ -76,7 +76,7 @@ def inner_product(programs, symbol_names, symbol_values, other_programs): the symbol free comparison circuits. Calculates out[i][j] = $ \langle \psi_{\text{programs[i]}} \\ - (\text{symbol_values[i]}) | \psi_{\text{other_programs[j]}} \rangle $ + (\text{symbol\_values[i]}) | \psi_{\text{other\_programs[j]}} \rangle $ >>> symbols = sympy.symbols('alpha beta')