Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move references in docstrings #228

Merged
merged 43 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
09aaf29
change sphinx sphinx-rtd-theme
purva-thakre Nov 10, 2023
35b201c
test autosummary additions
purva-thakre Nov 10, 2023
c8d667f
bibtex scaffolding
purva-thakre Nov 17, 2023
398ceaf
disable duplicate label key warnings
purva-thakre Nov 17, 2023
cbcfb8a
ref: channel_metrics
purva-thakre Nov 19, 2023
f381bbc
random to rand
purva-thakre Nov 19, 2023
773af44
all: docname in docnames
purva-thakre Nov 20, 2023
2eaa66c
refs: channel_ops
purva-thakre Nov 20, 2023
0ca4473
refs: channel_props
purva-thakre Nov 20, 2023
1de757b
refs: channels
purva-thakre Nov 21, 2023
45e91b3
refs: helper
purva-thakre Nov 21, 2023
e232abc
refs: matrices
purva-thakre Nov 21, 2023
7533dfa
refs: matrix_ops
purva-thakre Nov 21, 2023
e44dc17
refs: matrix_props
purva-thakre Nov 21, 2023
af12618
refs: measurement_ops
purva-thakre Nov 21, 2023
bd92169
refs: measurement_props
purva-thakre Nov 21, 2023
51ef719
refs: nonlocal_games
purva-thakre Nov 21, 2023
5413836
refs: perms
purva-thakre Nov 21, 2023
d3ede6f
refs: rand
purva-thakre Nov 21, 2023
dd91a88
refs: state_metrics
purva-thakre Nov 22, 2023
853a37f
refs: state_ops
purva-thakre Nov 22, 2023
3c69a15
refs: state_opt
purva-thakre Nov 22, 2023
8d33a5a
refs: state_props
purva-thakre Nov 22, 2023
e5fe07e
refs: states
purva-thakre Nov 22, 2023
b6ce85a
build errors
purva-thakre Nov 22, 2023
c68623c
linter
purva-thakre Nov 22, 2023
c9727f0
bibtex error
purva-thakre Nov 23, 2023
ea9fc95
Merge branch 'master' into move_docstring_ref
purva-thakre Nov 23, 2023
79e59bd
fix https://github.com/vprusso/toqito/pull/228#discussion_r1397772174…
purva-thakre Nov 23, 2023
d0b1998
pydocstyle errors
purva-thakre Nov 23, 2023
6a141af
Merge branch 'master' into move_docstring_ref
purva-thakre Nov 24, 2023
6506ead
Apply suggestions from code review
purva-thakre Nov 24, 2023
1dd4374
indent
purva-thakre Nov 24, 2023
7820df1
rigetti docs to rigetti forest
purva-thakre Nov 24, 2023
8cefa8f
capitalize section/chapter titles from watrous textbook
purva-thakre Nov 24, 2023
2a6c62c
Fix https://github.com/vprusso/toqito/pull/228#discussion_r1404576718
purva-thakre Nov 24, 2023
6280594
one link for qetlab
purva-thakre Nov 24, 2023
1ab5de9
change key style
purva-thakre Nov 24, 2023
c5d0a15
consistent bibtex key style
purva-thakre Nov 25, 2023
c6df2b6
month
purva-thakre Nov 25, 2023
1db6874
author: last name, first name
purva-thakre Nov 25, 2023
954bf51
Merge branch 'master' into move_docstring_ref
purva-thakre Nov 25, 2023
2d41cf2
check all docstrings
purva-thakre Nov 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/articles.bib
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#File for all article, arxiv and other web references
# To add a key, Lastname_year_abbreviatedtitle/firstletteroftitle
Copy link
Collaborator Author

@purva-thakre purva-thakre Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To add a key, Lastname_year_abbreviatedtitle/firstletteroftitle

@vprusso Would this work for the sake of consistency?

I did see your comment on this #228 (comment) but I would prefer to separate last name, year and first one/two words of title by underscore.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could align with how Google Scholar does bibtex keys, which is mostly what you have there. That is {lastname}{year}{abbreviatedtitle} Any opposition to that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I am going to create an issue for using Google scholar style for bibtex keys. I'll get to making these changes then.


#Last name begins with A
@misc{AaronsonMaxMixed,
@misc{Aaronson_2018_MaxMixed,
author = {Aaronson, Scott},
title = "Lecture 6: Mixed States",
howpublished = {https://www.scottaaronson.com/qclec/6.pdf}

}


@misc{arunachalam2017quantum,
@misc{Arunachalam_2017_QuantumHedging,
title={Quantum hedging in two-round prover-verifier interactions},
author={Arunachalam, Srinivasan and Molina, Abel and Russo, Vincent},
year={2017},
Expand All @@ -21,7 +22,7 @@ @misc{arunachalam2017quantum


#Last name begins with B
@article{Bandyopadhyay_2014,
@article{Bandyopadhyay_2014_Conclusive,
title={Conclusive exclusion of quantum states},
volume={89},
ISSN={1094-1622},
Expand Down
4 changes: 3 additions & 1 deletion docs/books.bib
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#File for all book references
# To add a key, Lastname_year_abbreviatedtitle OR firstletteroftitle

#Last name begins with A

Expand Down Expand Up @@ -34,6 +35,7 @@

#Last name begins with O


#Last name begins with P

#Last name begins with Q
Expand All @@ -49,7 +51,7 @@
#Last name begins with V

#Last name begins with W
@book{watrous_2018,
@book{Watrous_2018_TQI,
place={Cambridge},
title={The Theory of Quantum Information},
DOI={10.1017/9781316848142},
Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_metrics/completely_bounded_trace_norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def completely_bounded_trace_norm(phi: np.ndarray) -> float:
Find the completely bounded trace norm of a quantum channel.

Also known as the completely bounded diamond norm of a quantum
channel (Section 3.3.2 of :cite:`watrous_2018`). The algorithm in p.11 of :cite:`watrous2012simpler` with
channel (Section 3.3.2 of :cite:`Watrous_2018_TQI`). The algorithm in p.11 of :cite:`watrous2012simpler` with
implementation in QETLAB :cite:`QETLAB_link` is used.


Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_metrics/fidelity_of_separability.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def fidelity_of_separability(
extension exists, it cannot be assumed directly that the state is
separable. This function approximites the fidelity of separability by
maximizing over PPT channels & k-extendible entanglement breaking channels
i.e. an optimization problem over channels :cite:`watrous_2018` .
i.e. an optimization problem over channels :cite:`Watrous_2018_TQI` .

The following expression (Equation (I4) from :cite:`Philip2023schrodinger` ) defines the
constraints for approximating
Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_ops/apply_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
def apply_channel(mat: np.ndarray, phi_op: np.ndarray | list[list[np.ndarray]]) -> np.ndarray:
r"""Apply a quantum channel to an operator.

(Section: Representations and Characterizations of Channels of :cite:`watrous_2018`).
(Section: Representations and Characterizations of Channels of :cite:`Watrous_2018_TQI`).

Specifically, an application of the channel is defined as

Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_ops/dual_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def dual_channel(
) -> np.ndarray | list[list[np.ndarray]]:
r"""Compute the dual of a map (quantum channel).

(Section: Representations and Characterizations of Channels of :cite:`watrous_2018`).
(Section: Representations and Characterizations of Channels of :cite:`Watrous_2018_TQI`).

The map can be represented as a Choi matrix, with optional specification of input
and output dimensions. If the input channel maps :math:`M_{r,c}` to :math:`M_{x,y}`
Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_ops/kraus_to_choi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def kraus_to_choi(kraus_ops: list[list[np.ndarray]], sys: int = 2) -> np.ndarray:
r"""Compute the Choi matrix of a list of Kraus operators.

(Section: Kraus Representations of :cite:`watrous_2018`).
(Section: Kraus Representations of :cite:`Watrous_2018_TQI`).

The Choi matrix of the list of Kraus operators, :code:`kraus_ops`. The default convention is
that the Choi matrix is the result of applying the map to the second subsystem of the
Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_ops/partial_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def partial_channel(
sys: int = 2,
dim: list[int] | np.ndarray = None,
) -> np.ndarray:
r"""Apply channel to a subsystem of an operator :cite:`watrous_2018`.
r"""Apply channel to a subsystem of an operator :cite:`Watrous_2018_TQI`.

Applies the operator

Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_props/choi_rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def choi_rank(phi: np.ndarray | list[list[np.ndarray]]) -> int:
r"""Calculate the rank of the Choi representation of a quantum channel.

(Section 2.2: Quantum Channels from :cite:`watrous_2018`).
(Section 2.2: Quantum Channels from :cite:`Watrous_2018_TQI`).

Examples
==========
Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_props/is_completely_positive.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def is_completely_positive(
) -> bool:
r"""Determine whether the given channel is completely positive.

(Section: Linear Maps Of Square Operators from :cite:`watrous_2018`).
(Section: Linear Maps Of Square Operators from :cite:`Watrous_2018_TQI`).

A map :math:`\Phi \in \text{T} \left(\mathcal{X}, \mathcal{Y} \right)` is *completely
positive* if it holds that
Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_props/is_herm_preserving.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def is_herm_preserving(
) -> bool:
r"""Determine whether the given channel is Hermitian-preserving.

(Section: Linear Maps Of Square Operators from :cite:`watrous_2018`).
(Section: Linear Maps Of Square Operators from :cite:`Watrous_2018_TQI`).

A map :math:`\Phi \in \text{T} \left(\mathcal{X}, \mathcal{Y} \right)` is
*Hermitian-preserving* if it holds that
Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_props/is_positive.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def is_positive(
) -> bool:
r"""Determine whether the given channel is positive.

(Section: Linear Maps Of Square Operators from :cite:`watrous_2018`).
(Section: Linear Maps Of Square Operators from :cite:`Watrous_2018_TQI`).

A map :math:`\Phi \in \text{T} \left(\mathcal{X}, \mathcal{Y} \right)` is *positive* if it
holds that
Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_props/is_quantum_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def is_quantum_channel(
r"""Determine whether the given input is a quantum channel.

(Section 2.2.1: Definitions and Basic Notions Concerning Channels from
:cite:`watrous_2018`).
:cite:`Watrous_2018_TQI`).

A map :math:`\Phi \in \text{T} \left(\mathcal{X}, \mathcal{Y} \right)` is a *quantum
channel* for some choice of complex Euclidean spaces :math:`\mathcal{X}`
Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_props/is_trace_preserving.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def is_trace_preserving(
dim: list[int] | np.ndarray = None,
) -> bool:
r"""
Determine whether the given channel is trace-preserving (Section: Linear Maps Of Square Operators from :cite:`watrous_2018`).
Determine whether the given channel is trace-preserving (Section: Linear Maps Of Square Operators from :cite:`Watrous_2018_TQI`).

A map :math:`\Phi \in \text{T} \left(\mathcal{X}, \mathcal{Y} \right)` is
*trace-preserving* if it holds that
Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_props/is_unital.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def is_unital(
dim: int | list[int] | np.ndarray = None,
) -> bool:
r"""
Determine whether the given channel is unital (Chapter: Unital Channels And Majorization from :cite:`watrous_2018`).
Determine whether the given channel is unital (Chapter: Unital Channels And Majorization from :cite:`Watrous_2018_TQI`).

A map :math:`\Phi \in \text{T} \left(\mathcal{X}, \mathcal{Y} \right)` is *unital* if it
holds that
Expand Down
2 changes: 1 addition & 1 deletion toqito/channel_props/is_unitary.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def is_unitary(phi: np.ndarray | list[list[np.ndarray]]) -> bool:
r"""Given a quantum channel, determine if it is unitary.

(Section 2.2.1: Definitions and Basic Notions Concerning Channels from
:cite:`watrous_2018`).
:cite:`Watrous_2018_TQI`).

Let :math:`\mathcal{X}` be a complex Euclidean space an let :math:`U \in U(\mathcal{X})` be a
unitary operator. Then a unitary channel is defined as:
Expand Down
2 changes: 1 addition & 1 deletion toqito/channels/dephasing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def dephasing(dim: int, param_p: float = 0) -> np.ndarray:
r"""Produce the partially dephasing channel.

(Section: The Completely Dephasing Channel from :cite:`watrous_2018`).
(Section: The Completely Dephasing Channel from :cite:`Watrous_2018_TQI`).

The Choi matrix of the completely dephasing channel that acts on :code:`dim`-by-:code:`dim`
matrices.
Expand Down
2 changes: 1 addition & 1 deletion toqito/channels/depolarizing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def depolarizing(dim: int, param_p: float = 0) -> np.ndarray:
r"""Produce the partially depolarizing channel.

(Section: Replacement Channels and the Completely Depolarizing Channel from
:cite:`watrous_2018`).
:cite:`Watrous_2018_TQI`).

The Choi matrix of the completely depolarizing channel :cite:`WikiDepo` that acts on
:code:`dim`-by-:code:`dim` matrices.
Expand Down
2 changes: 1 addition & 1 deletion toqito/matrix_ops/vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

def vec(mat: np.ndarray) -> np.ndarray:
r"""
Perform the vec operation on a matrix ( Section: The Operator-Vector Correspondence from :cite:`watrous_2018`).
Perform the vec operation on a matrix ( Section: The Operator-Vector Correspondence from :cite:`Watrous_2018_TQI`).

Stacks the rows of the matrix on top of each other to
obtain the "vec" representation of the matrix.
Expand Down
2 changes: 1 addition & 1 deletion toqito/matrix_props/is_commuting.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def is_commuting(mat_1: np.ndarray, mat_2: np.ndarray) -> bool:
\left[X, Y\right] = XY - YX.

It holds that :math:`\left[X,Y\right]=0` if and only if :math:`X` and
:math:`Y` commute (Section: Lie Brackets And Commutants from :cite:`watrous_2018`).
:math:`Y` commute (Section: Lie Brackets And Commutants from :cite:`Watrous_2018_TQI`).

Examples
==========
Expand Down
2 changes: 1 addition & 1 deletion toqito/nonlocal_games/quantum_hedging.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class QuantumHedging:
Calculate optimal winning probabilities for hedging scenarios.

Calculate the maximal and minimal winning probabilities for quantum
hedging to occur in certain two-party scenarios :cite:`arunachalam2017quantum, Molina_2012`.
hedging to occur in certain two-party scenarios :cite:`Arunachalam_2017_QuantumHedging, Molina_2012`.

Examples
==========
Expand Down
2 changes: 1 addition & 1 deletion toqito/state_metrics/fidelity_of_separability.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def fidelity_of_separability(
(Positive Partial Transpose (PPT), symmetric extensions (k-extendibility
) :cite:`Hayden_2013` ) This function approximites the fidelity of separability by
maximizing over PPT states & k-extendible states i.e. an optimization
problem over states :cite:`watrous_2018`.
problem over states :cite:`Watrous_2018_TQI`.

The following expression (Equation (H2) from :cite:`Philip2023schrodinger` ) defines the
constraints for approxiamting
Expand Down
2 changes: 1 addition & 1 deletion toqito/state_opt/state_exclusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def state_exclusion(
\end{aligned}
\end{equation}

The conclusive state exclusion SDP is written explicitly in :cite:`Bandyopadhyay_2014`. The problem of conclusive
The conclusive state exclusion SDP is written explicitly in :cite:`Bandyopadhyay_2014_Conclusive`. The problem of conclusive
state exclusion was also thought about under a different guise in :cite:`Pusey_2012`.

Examples
Expand Down
2 changes: 1 addition & 1 deletion toqito/state_props/is_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def is_ensemble(states: list[np.ndarray]) -> bool:
r"""
Determine if a set of states constitute an ensemble (Section: Ensemble Of Quantum States from cite:`watrous_2018`).
Determine if a set of states constitute an ensemble (Section: Ensemble Of Quantum States from cite:`Watrous_2018_TQI`).

An ensemble of quantum states is defined by a function

Expand Down
2 changes: 1 addition & 1 deletion toqito/state_props/von_neumann_entropy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def von_neumann_entropy(rho: np.ndarray) -> float:
r"""
Compute the von Neumann entropy of a density matrix :cite:`WikiUVonNeumann`, Section: "Definitions Of Quantum Entropic Functions" from :cite:`watrous_2018`).
Compute the von Neumann entropy of a density matrix :cite:`WikiUVonNeumann`, Section: "Definitions Of Quantum Entropic Functions" from :cite:`Watrous_2018_TQI`).

Let :math:`P \in \text{Pos}(\mathcal{X})` be a positive semidefinite operator, for a complex
Euclidean space :math:`\mathcal{X}`. Then one defines the *von Neumann entropy* as
Expand Down
2 changes: 1 addition & 1 deletion toqito/states/max_mixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def max_mixed(dim: int, is_sparse: bool = False) -> [np.ndarray, sparse.dia_matrix]:
r"""
Produce the maximally mixed state :cite:`AaronsonMaxMixed`.
Produce the maximally mixed state :cite:`Aaronson_2018_MaxMixed`.

Produces the maximally mixed state on of :code:`dim` dimensions. The maximally mixed state is
defined as
Expand Down