Skip to content

Commit 70f9808

Browse files
committed
fix: use comment-form thumbnail config and assign specific figures
mkdocs-gallery requires thumbnail_path as a comment directive (# mkdocs_gallery_thumbnail_path = '...'), not a Python assignment. Also assign relevant figures to each tutorial instead of generic logo.
1 parent 197d840 commit 70f9808

File tree

13 files changed

+13
-12
lines changed

13 files changed

+13
-12
lines changed

docs/content/examples/basics/intro_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
from toqito.matrices import standard_basis
4141

42-
mkdocs_gallery_thumbnail_path = 'figures/logo.png'
42+
# mkdocs_gallery_thumbnail_path = 'figures/alice_and_bob.svg'
4343
# |0>
4444
standard_basis(2)[0]
4545

docs/content/examples/extended_nonlocal_games/bit_commitment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
q_val = bc_binding_game.commuting_measurement_value_upper_bound(k=1)
120120

121121
print("Upper bound on the quantum value (Alice's cheating probability): ", np.around(q_val, decimals=5))
122-
mkdocs_gallery_thumbnail_path = 'figures/logo.png'
122+
# mkdocs_gallery_thumbnail_path = 'figures/nonlocal_game_quantum_strategy.svg'
123123

124124
# %%
125125
# ## Interpreting the Result

docs/content/examples/extended_nonlocal_games/enlg_bb84.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
# The non-signaling value of BB84 under parallel repetition.
190190
import numpy as np
191191

192-
mkdocs_gallery_thumbnail_path = 'figures/logo.png'
192+
# mkdocs_gallery_thumbnail_path = 'figures/referee.svg'
193193
from toqito.nonlocal_games.extended_nonlocal_game import ExtendedNonlocalGame
194194

195195
# Define the bb84 game for two parallel repetitions.

docs/content/examples/extended_nonlocal_games/enlg_chsh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141

142142
# The non-signaling value is 3/4 = 0.75
143143
print("The non-signaling value is ", np.around(chsh.nonsignaling_value(), decimals=2))
144-
mkdocs_gallery_thumbnail_path = 'figures/logo.png'
144+
# mkdocs_gallery_thumbnail_path = 'figures/alice_and_bob.svg'
145145

146146
# %%
147147
# As we know that $\omega(G_{CHSH}) = \omega_{ns}(G_{CHSH}) = 3/4$ and that

docs/content/examples/extended_nonlocal_games/enlg_introduction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,5 +240,5 @@
240240
# games and use `|toqito⟩` to calculate their various values.
241241
#
242242
# %%
243-
mkdocs_gallery_thumbnail_path = 'figures/extended_nonlocal_game.svg'
243+
# mkdocs_gallery_thumbnail_path = 'figures/extended_nonlocal_game.svg'
244244
# We will start by examining the BB84 extended nonlocal game in [The BB84 extended nonlocal game](../enlg_bb84)

docs/content/examples/extended_nonlocal_games/enlg_mub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
g_mub = ExtendedNonlocalGame(prob_mat, pred_mat)
124124
q_val = g_mub.quantum_value_lower_bound()
125125
print("The standard quantum value lower bound is ", np.around(q_val, decimals=2))
126-
mkdocs_gallery_thumbnail_path = 'figures/logo.png'
126+
# mkdocs_gallery_thumbnail_path = 'figures/measurement_inclusions.svg'
127127

128128
# %%
129129
# Note that as we are calculating a lower bound, it is possible that a value this

docs/content/examples/nonlocal_games/nonlocal_game.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@
443443

444444
from toqito.nonlocal_games import NonlocalGame
445445

446-
mkdocs_gallery_thumbnail_path = 'figures/nonlocal_game.svg'
446+
# mkdocs_gallery_thumbnail_path = 'figures/nonlocal_game.svg'
447447
# Define constraints c_1 and c_2.
448448
c_1 = np.zeros((2, 2))
449449
c_2 = np.zeros((2, 2))

docs/content/examples/nonlocal_games/xor_quantum_value.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
odd_cycle = XORGame(prob_mat, pred_mat)
320320
print(f"The classical value of games is: {np.around(odd_cycle.classical_value(), decimals=2)}")
321321
print(f"The quantum value of games is: {np.around(odd_cycle.quantum_value(), decimals=2)}")
322-
mkdocs_gallery_thumbnail_path = 'figures/logo.png'
322+
# mkdocs_gallery_thumbnail_path = 'figures/nonlocal_game_quantum_strategy.svg'
323323

324324
# %%
325325
# Note that the odd cycle game is another example of an XOR game where the

docs/content/examples/quantum_states/circulant_states.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
print("\n------------------------------------------------------")
9494
print(f"Do the analytical and numerical results agree? {analytical_is_ad == numerical_is_ad}")
9595
print("------------------------------------------------------")
96-
mkdocs_gallery_thumbnail_path = 'figures/logo.png'
96+
# mkdocs_gallery_thumbnail_path = 'figures/logo.png'
9797

9898
# %%
9999
# The results from both the analytical eigenvalue criterion and the numerical

docs/content/examples/quantum_states/classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,4 +261,4 @@ def povm_residual(states: list[np.ndarray], povm: dict[tuple[int, int], np.ndarr
261261
#
262262
result = factor_width(mat, k=2)
263263
print(result["feasible"])
264-
mkdocs_gallery_thumbnail_path = 'figures/classification_tetrahedron.png'
264+
# mkdocs_gallery_thumbnail_path = 'figures/classification_tetrahedron.png'

0 commit comments

Comments
 (0)