Skip to content

Commit

Permalink
Merge branch 'master' into schmidt
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomello committed Sep 24, 2024
2 parents 9326027 + 68bdb98 commit 19ccd7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "qibo"
version = "0.2.12"
version = "0.2.13"
description = "A framework for quantum computing with hardware acceleration."
authors = ["The Qibo team"]
license = "Apache License 2.0"
Expand Down
8 changes: 4 additions & 4 deletions src/qibo/quantum_info/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,15 @@ def hellinger_shot_error(
def total_variation_distance(
prob_dist_p, prob_dist_q, validate: bool = False, backend=None
):
"""Calculates the total variation distance between two discrete probability distributions.
"""Calculate the total variation distance between two discrete probability distributions.
For probabilities :math:`p` and :math:`q`, the total variation distance is defined as
.. math::
\\operatorname{TVD}(p, q) = \frac{1}{2} \\, \\norm{p - q}_{1}
= \\frac{1}{2} \\, \\sum_{x} \\, \\abs{p(x) - q(x)} \\, ,
\\operatorname{TVD}(p, \\, q) = \\frac{1}{2} \\, \\|p - q\\|_{1}
= \\frac{1}{2} \\, \\sum_{x} \\, \\left|p(x) - q(x)\\right| \\, ,
where :math:`\\norm{\\cdot}_{1}` detones the :math:`\\ell_{1}`-norm.
where :math:`\\|\\cdot\\|_{1}` detones the :math:`\\ell_{1}`-norm.
Args:
prob_dist_p (ndarray or list): discrete probability distribution :math:`p`.
Expand Down

0 comments on commit 19ccd7f

Please sign in to comment.