Skip to content

Commit

Permalink
minor docs tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bdoolittle committed Aug 3, 2024
1 parent 31cfb77 commit e2991dd
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/source/cost/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ Custom cost functions can be implemented using PennyLane.
linear_inequalities
entropic_quantities
magic_squares_game
negativity
nonlocality_witnesses/index
6 changes: 6 additions & 0 deletions docs/source/cost/negativity.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Partial Transpose Negativity
============================

.. currentmodule:: qnetvo

.. autofunction:: negativity_cost_fn
5 changes: 5 additions & 0 deletions docs/source/cost/qnodes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Probability QNodes

.. autofunction:: joint_probs_qnode

Density Matrix QNodes
---------------------

.. autofunction:: density_matrix_qnode

Parity Observable QNodes
------------------------

Expand Down
6 changes: 6 additions & 0 deletions docs/source/utilities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ Utilities

.. currentmodule:: qnetvo


Mathematical Operations
-----------------------

.. autofunction:: partial_transpose

Circuit Tomography
------------------

Expand Down
2 changes: 1 addition & 1 deletion src/qnetvo/cost/negativity.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def negativity_cost_fn(network_ansatz, m, n, wires, qnode_kwargs={}):
the :math:`B` party, and :math:`\\lambda_i` are all of the eigenvalues of :math:`\\rho^{\\Gamma_B}`.
For more information on negativity and its applications in quantum information theory,
see [Vidal and Werner (2001)](https://arxiv.org/pdf/quant-ph/0102117).
(see `Vidal and Werner, 2001 <https://arxiv.org/pdf/quant-ph/0102117>`_).
:param ansatz: The ansatz circuit on which the negativity is evaluated.
:type ansatz: NetworkAnsatz
Expand Down
6 changes: 3 additions & 3 deletions src/qnetvo/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,16 @@ def partial_transpose(dm, d1, d2):
:param dm: The density matrix to be partially transposed.
:type dm: np.array
:param d1: The dimension of the first subsystem (e.g., 2^m where m is the number of qubits in the first subsystem).
:param d1: The dimension of the first subsystem (e.g., :math:`2^m` where :math:`m` is the number of qubits in the first subsystem).
:type d1: int
:param d2: The dimension of the second subsystem (e.g., 2^n where n is the number of qubits in the second subsystem).
:param d2: The dimension of the second subsystem (e.g., :math:`2^n` where :math:`n` is the number of qubits in the second subsystem).
:type d2: int
:returns: The partially transposed density matrix.
:rtype: np.array
:raises ValueError: If the product of `d1` and `d2` does not match the size of the density matrix.
:raises ValueError: If the product of ``d1`` and ``d2`` does not match the size of the density matrix.
"""

if d1 * d2 != dm.shape[0]:
Expand Down

0 comments on commit e2991dd

Please sign in to comment.