Skip to content

Commit e012aa9

Browse files
nikhilkhatriDimitri Kartsaklisneiljdoisobelhooper
committed
Release version 0.4.2
Co-authored-by: Dimitri Kartsaklis <dimitri.kartsaklis@quantinuum.com> Co-authored-by: Neil Ortega <neil.ortega@quantinuum.com> Co-authored-by: Isobel Hooper <isobel.hooper@cambridgequantum.com>
1 parent 00812e1 commit e012aa9

31 files changed

+612
-273
lines changed

.github/workflows/build_test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
python-version: [ 3.9, "3.10", "3.11", "3.12" ]
22+
python-version: [ "3.10", "3.11", "3.12" ]
2323
outputs:
2424
error-check: ${{ steps.error-check.conclusion }}
2525
steps:
@@ -49,7 +49,7 @@ jobs:
4949
runs-on: ubuntu-latest
5050
strategy:
5151
matrix:
52-
python-version: [ 3.9, "3.10", "3.11", "3.12" ]
52+
python-version: [ "3.10", "3.11", "3.12" ]
5353
steps:
5454
- uses: actions/checkout@v3
5555
- name: Setup Python ${{ matrix.python-version }}
@@ -106,7 +106,7 @@ jobs:
106106
runs-on: ubuntu-latest
107107
strategy:
108108
matrix:
109-
python-version: [ 3.9, "3.10", "3.11", "3.12" ]
109+
python-version: [ "3.10", "3.11", "3.12" ]
110110
steps:
111111
- uses: actions/checkout@v3
112112
- name: Setup Python ${{ matrix.python-version }}

.github/workflows/docs.yml

+21-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,19 @@ on:
77
- 'beta'
88
- 'release'
99
pull_request:
10+
workflow_dispatch:
11+
release:
12+
types:
13+
- released
14+
15+
# We need the following permission to upload the documentation as a release asset.
16+
permissions:
17+
contents: write
1018

1119
env:
1220
WORKFLOWS_DIR: .github/workflows
1321
DOCS_DIR: docs
22+
DOCS_BUILD_DIR: docs/_build/html
1423

1524
jobs:
1625
docs:
@@ -19,11 +28,12 @@ jobs:
1928
steps:
2029
- uses: actions/checkout@v3
2130
with:
31+
submodules: recursive
2232
fetch-depth: 0 # fetches tags, required for version info
2333
- name: Set up Python
2434
uses: actions/setup-python@v4
2535
with:
26-
python-version: 3.9
36+
python-version: "3.10"
2737
- name: Build lambeq
2838
run: pip install .
2939
- name: Install documentation dependencies
@@ -42,6 +52,15 @@ jobs:
4252
env:
4353
REPO: self
4454
BRANCH: docs
45-
FOLDER: docs/_build/html/
55+
FOLDER: ${{ env.DOCS_BUILD_DIR }}
4656
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4757
CLEAR_GLOBS_FILE: ${{ env.WORKFLOWS_DIR }}/clear-target-files
58+
- name: Zip up documentation to store as release asset
59+
if: ${{ github.event_name == 'release' }}
60+
run: |
61+
tar -cavf lambeq-docs-${{ github.event.release.tag_name }}.tar.gz -C ${{ env.DOCS_BUILD_DIR }} .
62+
- name: Add documentation artifact as release asset
63+
if: ${{ github.event_name == 'release' }}
64+
run: gh release upload ${{ github.event.release.tag_name }} lambeq-docs-${{ github.event.release.tag_name }}.tar.gz --clobber
65+
env:
66+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitmodules

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "docs/quantinuum-sphinx"]
2+
path = docs/quantinuum-sphinx
3+
url = https://github.com/CQCL/quantinuum-sphinx.git
4+
branch = dist

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ lambeq is a toolkit for quantum natural language processing (QNLP).
2626

2727
### Prerequisites
2828

29-
- Python 3.9+
29+
- Python 3.10+
3030

3131
### Installation
3232

docs/_static/nav-config.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const navConfig = {
2+
"navTextLinks": [
3+
4+
{
5+
"title": "Getting started",
6+
"href": "installation.html",
7+
},
8+
{
9+
"title": "NLP 101",
10+
"href": "nlp-intro.html",
11+
},
12+
{
13+
"title": "Tutorials",
14+
"href": "tutorials/sentence-input.html",
15+
},
16+
{
17+
"title": "Code examples",
18+
"href": "notebooks.html",
19+
},
20+
{
21+
"title": "API reference",
22+
"href": "root-api.html",
23+
},
24+
],
25+
"navProductName": "lambeq",
26+
"navIconLinks": [],
27+
}

docs/bibliography.rst

+25-25
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,52 @@
33
Bibliography
44
============
55

6-
.. [AC2004] S. Abramsky, B. Coecke. `A Categorical Semantics for Quantum Protocols <https://arxiv.org/pdf/quant-ph/0402130.pdf>`_, LiCS 2004
6+
.. [AC2004] Abramsky S, Coecke B. `A Categorical Semantics for Quantum Protocols <https://arxiv.org/pdf/quant-ph/0402130.pdf>`_, LiCS 2004
77
8-
.. [SC2021] S. Clark. `Something Old, Something New: Grammar-based CCG Parsing with Transformer Models <https://arxiv.org/pdf/2109.10044.pdf>`_, `arXiv:2109.10044`, 2021
8+
.. [SC2021] Clark S. `Something Old, Something New: Grammar-based CCG Parsing with Transformer Models <https://arxiv.org/pdf/2109.10044.pdf>`_, `arXiv:2109.10044`, 2021
99
10-
.. [CSC2010] B. Coecke, M. Sadrzadeh, S. Clark. `Mathematical Foundations for a Compositional Distributional Model of Meaning <https://arxiv.org/pdf/1003.4394.pdf>`_, `Lambek Festschirft`, special issue of `Linguistic Analysis`, 2010
10+
.. [CSC2010] Coecke B, Sadrzadeh M, Clark S. `Mathematical Foundations for a Compositional Distributional Model of Meaning <https://arxiv.org/pdf/1003.4394.pdf>`_, `Lambek Festschirft`, special issue of `Linguistic Analysis`, 2010
1111
12-
.. [CW2021] B. Coecke, V. Wang. `Grammar Equations <https://arxiv.org/pdf/2106.07485.pdf>`_, `SemSpace 2021`
12+
.. [CW2021] Coecke B, Wang V. `Grammar Equations <https://arxiv.org/pdf/2106.07485.pdf>`_, `SemSpace 2021`
1313
14-
.. [FTC2020] G. de Felice, A. Toumi, B. Coecke. `DisCoPy: Monoidal Categories in Python <https://arxiv.org/pdf/2005.02975.pdf>`_, `ACT 2020`
14+
.. [FTC2020] de Felice G, Toumi A, Coecke B. `DisCoPy: Monoidal Categories in Python <https://arxiv.org/pdf/2005.02975.pdf>`_, `ACT 2020`
1515
16-
.. [GL2012] F. Gao, H. Lixing. `Implementing the Nelder-Mead Simplex Algorithm with Adaptive Parameters <https://link.springer.com/article/10.1007/s10589-010-9329-3>`_, `Computational Optimization and Applications`,` 51. 259-277.10.1007/s10589-010-9329-3, 2012
16+
.. [GL2012] Gao F, Lixing H. `Implementing the Nelder-Mead Simplex Algorithm with Adaptive Parameters <https://link.springer.com/article/10.1007/s10589-010-9329-3>`_, `Computational Optimization and Applications`,` 51. 259-277.10.1007/s10589-010-9329-3, 2012
1717
18-
.. [Hea2019] V. Havlíček, A. Córcoles, K. Temme, A. Harrow, A. Kandala, J. Chow, J. Gambetta. `Supervised Learning with Quantum-Enhanced Feature Spaces <https://www.nature.com/articles/s41586-019-0980-2>`_. `Nature`, 567, 2019
18+
.. [Hea2019] Havlíček V, Córcoles A, Temme K, Harrow A, Kandala A, Chow J, Gambetta J. `Supervised Learning with Quantum-Enhanced Feature Spaces <https://www.nature.com/articles/s41586-019-0980-2>`_. `Nature`, 567, 2019
1919
20-
.. [HS2007] J. Hockenmaier, M. Steedman. `CCGbank: A Corpus of CCG Derivations and Dependency Structures Extracted from the Penn Treebank <https://aclanthology.org/J07-3004.pdf>`_, `Computational Linguistics, Volume 33, Number 3`, September 2007
20+
.. [HS2007] Hockenmaier J, Steedman M. `CCGbank: A Corpus of CCG Derivations and Dependency Structures Extracted from the Penn Treebank <https://aclanthology.org/J07-3004.pdf>`_, `Computational Linguistics, Volume 33, Number 3`, September 2007
2121
22-
.. [HV2013] C. Heunen, J. Vicary. `Introduction to Categorical Quantum Mechanics <http://www.cs.ox.ac.uk/people/jamie.vicary/IntroductionToCategoricalQuantumMechanics.pdf>`_, `Course Notes`, Oxford University, 2013
22+
.. [HV2013] Heunen C, Vicary J. `Introduction to Categorical Quantum Mechanics <http://www.cs.ox.ac.uk/people/jamie.vicary/IntroductionToCategoricalQuantumMechanics.pdf>`_, `Course Notes`, Oxford University, 2013
2323
24-
.. [Kar2016] D. Kartsaklis. `Coordination in Categorical Compositional Distributional Semantics <https://arxiv.org/pdf/1606.01515.pdf>`_, `SemSpace 2016`
24+
.. [Kar2016] Kartsaklis D. `Coordination in Categorical Compositional Distributional Semantics <https://arxiv.org/pdf/1606.01515.pdf>`_, `SemSpace 2016`
2525
26-
.. [Kea2014] D. Kartsaklis, M. Sadrzadeh, S. Pulman, B. Coecke. `Reasoning about Meaning in Natural Language with Compact Closed Categories and Frobenius Algebras <https://arxiv.org/pdf/1401.5980.pdf>`_, `Logic and Algebraic Structures in Quantum Computing and Information`, 2014
26+
.. [Kea2014] Kartsaklis D, Sadrzadeh M, Pulman S, Coecke B. `Reasoning about Meaning in Natural Language with Compact Closed Categories and Frobenius Algebras <https://arxiv.org/pdf/1401.5980.pdf>`_, `Logic and Algebraic Structures in Quantum Computing and Information`, 2014
2727
28-
.. [Kea2021] D. Kartsaklis, I. Fan, R. Yeung, A. Pearson, R. Lorenz, A. Toumi, G. de Felice, K. Meichanetzidis, S. Clark, B. Coecke. `lambeq: An Efficient High-Level Python Library for Quantum NLP <https://arxiv.org/pdf/2110.04236.pdf>`_, `arXiv:2110.04236`, 2021
28+
.. [Kea2021] Kartsaklis D, Fan I, Yeung R, Pearson A, Lorenz R, Toumi A, de Felice G, Meichanetzidis K, Clark S, Coecke B. `lambeq: An Efficient High-Level Python Library for Quantum NLP <https://arxiv.org/pdf/2110.04236.pdf>`_, `arXiv:2110.04236`, 2021
2929
30-
.. [Lam1999] J. Lambek. Type Grammar Revisited, `Logical Aspects of Computational Linguistics`, 1999
30+
.. [Lam1999] Lambek J. Type Grammar Revisited, `Logical Aspects of Computational Linguistics`, 1999
3131
32-
.. [Lea2021] R. Lorenz, A. Pearson, K. Meichanetzidis, D. Kartsaklis, B. Coecke. `QNLP in Practice: Running Compositional Models of Meaning on a Quantum Computer <https://arxiv.org/pdf/2102.12846.pdf>`_ `arXiv:2102.12846`, 2021
32+
.. [Lea2021] Lorenz R, Pearson A, Meichanetzidis K, Kartsaklis D, Coecke B. `QNLP in Practice: Running Compositional Models of Meaning on a Quantum Computer <https://arxiv.org/pdf/2102.12846.pdf>`_ `arXiv:2102.12846`, 2021
3333
34-
.. [NM1965] J. Nelder, R. Mead. `A Simplex Method for Function Minimization <https://people.duke.edu/~hpgavin/cee201/Nelder+Mead-ComputerJournal-1965.pdf>`_, `The Computer Journal` 7: 308-13, 1965
34+
.. [NM1965] Nelder J, Mead R. `A Simplex Method for Function Minimization <https://people.duke.edu/~hpgavin/cee201/Nelder+Mead-ComputerJournal-1965.pdf>`_, `The Computer Journal` 7: 308-13, 1965
3535
36-
.. [Mea2020] K. Meichanetzidis, A. Toumi, G. de Felice, B. Coecke. `Grammar-Aware Question-Answering on Quantum Computers <https://arxiv.org/pdf/2012.03756.pdf>`_, `arXiv:2012.03756`, 2020
36+
.. [Mea2020] Meichanetzidis K, Toumi A, de Felice G, Coecke B. `Grammar-Aware Question-Answering on Quantum Computers <https://arxiv.org/pdf/2012.03756.pdf>`_, `arXiv:2012.03756`, 2020
3737
38-
.. [Oea2021] M. Ostaszewski, E. Grant, M. Benedetti. `Structure Optimization for Parameterized Quantum Circuits <https://quantum-journal.org/papers/q-2021-01-28-391/pdf/>`_, `Quantum`, 2021
38+
.. [Oea2021] Ostaszewski M, Grant E, Benedetti M. `Structure Optimization for Parameterized Quantum Circuits <https://quantum-journal.org/papers/q-2021-01-28-391/pdf/>`_, `Quantum`, 2021
3939
40-
.. [Rea2016] L. Rimell, J. Maillard, T. Polajnar, S. Clark. `RELPRON: A Relative Clause Evaluation Data Set for Compositional Distributional Semantics <https://direct.mit.edu/coli/article/42/4/661/1555/RELPRON-A-Relative-Clause-Evaluation-Data-Set-for>`_, `Computational Linguistics`, 2016
40+
.. [Rea2016] Rimell L, Maillard J, Polajnar T, Clark S. `RELPRON: A Relative Clause Evaluation Data Set for Compositional Distributional Semantics <https://direct.mit.edu/coli/article/42/4/661/1555/RELPRON-A-Relative-Clause-Evaluation-Data-Set-for>`_, `Computational Linguistics`, 2016
4141
42-
.. [SCC2014a] M. Sadrzadeh, S. Clark, B. Coecke. `The Frobenius Anatomy of Word Meanings I: Subject and Object Relative Pronouns <https://arxiv.org/pdf/1404.5278.pdf>`_, `Journal of Logic and Computation`, 2014
42+
.. [SCC2014a] Sadrzadeh M, Clark S, Coecke B. `The Frobenius Anatomy of Word Meanings I: Subject and Object Relative Pronouns <https://arxiv.org/pdf/1404.5278.pdf>`_, `Journal of Logic and Computation`, 2014
4343
44-
.. [SCC2014b] M. Sadrzadeh, S. Clark, B. Coecke. `The Frobenius Anatomy of Word Meanings II: Possessive Relative Pronouns <https://arxiv.org/pdf/1406.4690.pdf>`_, `Journal of Logic and Computation`, 2014
44+
.. [SCC2014b] Sadrzadeh M, Clark S, Coecke B. `The Frobenius Anatomy of Word Meanings II: Possessive Relative Pronouns <https://arxiv.org/pdf/1406.4690.pdf>`_, `Journal of Logic and Computation`, 2014
4545
46-
.. [SJA2019] S. Sim, P. Johnson, A. Aspuru-Guzik. `Expressibility and Entangling Capability of Parameterized Quantum Circuits for Hybrid Quantum-Classical Algorithms <https://arxiv.org/pdf/1905.10876.pdf>`_, `arXiv:1905.10876`, 2019
46+
.. [SJA2019] Sim S, Johnson P, Aspuru-Guzik A. `Expressibility and Entangling Capability of Parameterized Quantum Circuits for Hybrid Quantum-Classical Algorithms <https://arxiv.org/pdf/1905.10876.pdf>`_, `arXiv:1905.10876`, 2019
4747
48-
.. [Spa1998] J. C. Spall, `Implementation of the simultaneous perturbation algorithm for stochastic optimization <https://ieeexplore.ieee.org/document/705889>`_, `IEEE Transactions on Aerospace and Electronic Systems`, 1998
48+
.. [Spa1998] Spall J C. `Implementation of the simultaneous perturbation algorithm for stochastic optimization <https://ieeexplore.ieee.org/document/705889>`_, `IEEE Transactions on Aerospace and Electronic Systems`, 1998
4949
50-
.. [Ste2000] M. Steedman. The Syntactic Process, MIT Press, 2000
50+
.. [Ste2000] Steedman M. The Syntactic Process, MIT Press, 2000
5151
52-
.. [YK2021] R. Yeung, D. Kartsaklis. `A CCG-Based Version of the DisCoCat Framework <https://aclanthology.org/2021.semspace-1.3.pdf>`_, `SemSpace 2021`
52+
.. [YK2021] Yeung R, Kartsaklis D. `A CCG-Based Version of the DisCoCat Framework <https://aclanthology.org/2021.semspace-1.3.pdf>`_, `SemSpace 2021`
5353
54-
.. [YNM2017] M. Yoshikawa, H. Noji, Y. Matsumoto. `A* CCG Parsing with a Supertag and Dependency Factored Model <https://arxiv.org/pdf/1704.06936.pdf>`_, `ACL 2017`
54+
.. [YNM2017] Yoshikawa M, Noji H, Matsumoto Y. `A* CCG Parsing with a Supertag and Dependency Factored Model <https://arxiv.org/pdf/1704.06936.pdf>`_, `ACL 2017`

docs/conf.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
numpydoc_show_class_members = False
6363

6464
# Add any paths that contain templates here, relative to this directory.
65-
templates_path = ['_templates']
65+
templates_path = ['_templates', 'quantinuum-sphinx/_templates']
6666

6767
# List of patterns, relative to source directory, that match files and
6868
# directories to ignore when looking for source files.
@@ -75,7 +75,7 @@
7575
# The theme to use for HTML and HTML Help pages. See the documentation for
7676
# a list of builtin themes.
7777
#
78-
html_theme = 'sphinx_rtd_theme'
78+
html_theme = 'furo'
7979
html_theme_options = {
8080
'navigation_depth': -1
8181
}
@@ -90,9 +90,9 @@
9090
# Add any paths that contain custom static files (such as style sheets) here,
9191
# relative to this directory. They are copied after the builtin static files,
9292
# so a file named "default.css" will overwrite the builtin "default.css".
93-
html_static_path = ['_static']
93+
html_static_path = ['quantinuum-sphinx/_static', '_static']
9494
html_logo = '_static/images/lambeq_logo.png'
95-
html_favicon = '_static/images/favicon.ico'
95+
html_favicon = 'quantinuum-sphinx/_static/assets/quantinuum_favicon.svg'
9696

9797
# CSS for allowing text wrapping within table cells
9898
html_css_files = [

docs/examples/classical-pipeline.ipynb

+7-6
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,14 @@
248248
"name": "stderr",
249249
"output_type": "stream",
250250
"text": [
251-
"Epoch 5: train/loss: 0.6386 valid/loss: 0.7189 train/acc: 0.5786 valid/acc: 0.5333\n",
252-
"Epoch 10: train/loss: 0.5280 valid/loss: 0.6392 train/acc: 0.5857 valid/acc: 0.5833\n",
253-
"Epoch 15: train/loss: 0.4138 valid/loss: 0.4924 train/acc: 0.7500 valid/acc: 0.7500\n",
254-
"Epoch 20: train/loss: 0.1306 valid/loss: 0.2794 train/acc: 0.9857 valid/acc: 0.9500\n",
255-
"Epoch 25: train/loss: 0.0120 valid/loss: 0.0595 train/acc: 0.9929 valid/acc: 0.9833\n",
251+
"Epoch 5: train/loss: 0.6386 valid/loss: 0.7189 train/time: 0.68s valid/time: 1.47s train/acc: 0.5786 valid/acc: 0.5333\n",
252+
"Epoch 10: train/loss: 0.5280 valid/loss: 0.6392 train/time: 0.49s valid/time: 0.15s train/acc: 0.5857 valid/acc: 0.5833\n",
253+
"Epoch 15: train/loss: 0.4138 valid/loss: 0.4924 train/time: 0.38s valid/time: 0.27s train/acc: 0.7500 valid/acc: 0.7500\n",
254+
"Epoch 20: train/loss: 0.1306 valid/loss: 0.2794 train/time: 0.60s valid/time: 0.14s train/acc: 0.9857 valid/acc: 0.9500\n",
255+
"Epoch 25: train/loss: 0.0120 valid/loss: 0.0595 train/time: 0.37s valid/time: 0.21s train/acc: 0.9929 valid/acc: 0.9833\n",
256256
"\n",
257-
"Training completed!\n"
257+
"Training completed!\n",
258+
"train/time: 2.52s train/time_per_epoch: 0.10s train/time_per_step: 0.03s valid/time: 2.23s valid/time_per_eval: 0.09s\n"
258259
]
259260
}
260261
],

0 commit comments

Comments
 (0)