Skip to content

Commit

Permalink
Release version 0.4.2
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
4 people committed Aug 9, 2024
1 parent 00812e1 commit e012aa9
Show file tree
Hide file tree
Showing 31 changed files with 612 additions and 273 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.9, "3.10", "3.11", "3.12" ]
python-version: [ "3.10", "3.11", "3.12" ]
outputs:
error-check: ${{ steps.error-check.conclusion }}
steps:
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.9, "3.10", "3.11", "3.12" ]
python-version: [ "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.9, "3.10", "3.11", "3.12" ]
python-version: [ "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
Expand Down
23 changes: 21 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,19 @@ on:
- 'beta'
- 'release'
pull_request:
workflow_dispatch:
release:
types:
- released

# We need the following permission to upload the documentation as a release asset.
permissions:
contents: write

env:
WORKFLOWS_DIR: .github/workflows
DOCS_DIR: docs
DOCS_BUILD_DIR: docs/_build/html

jobs:
docs:
Expand All @@ -19,11 +28,12 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0 # fetches tags, required for version info
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"
- name: Build lambeq
run: pip install .
- name: Install documentation dependencies
Expand All @@ -42,6 +52,15 @@ jobs:
env:
REPO: self
BRANCH: docs
FOLDER: docs/_build/html/
FOLDER: ${{ env.DOCS_BUILD_DIR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLEAR_GLOBS_FILE: ${{ env.WORKFLOWS_DIR }}/clear-target-files
- name: Zip up documentation to store as release asset
if: ${{ github.event_name == 'release' }}
run: |
tar -cavf lambeq-docs-${{ github.event.release.tag_name }}.tar.gz -C ${{ env.DOCS_BUILD_DIR }} .
- name: Add documentation artifact as release asset
if: ${{ github.event_name == 'release' }}
run: gh release upload ${{ github.event.release.tag_name }} lambeq-docs-${{ github.event.release.tag_name }}.tar.gz --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "docs/quantinuum-sphinx"]
path = docs/quantinuum-sphinx
url = https://github.com/CQCL/quantinuum-sphinx.git
branch = dist
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lambeq is a toolkit for quantum natural language processing (QNLP).

### Prerequisites

- Python 3.9+
- Python 3.10+

### Installation

Expand Down
27 changes: 27 additions & 0 deletions docs/_static/nav-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const navConfig = {
"navTextLinks": [

{
"title": "Getting started",
"href": "installation.html",
},
{
"title": "NLP 101",
"href": "nlp-intro.html",
},
{
"title": "Tutorials",
"href": "tutorials/sentence-input.html",
},
{
"title": "Code examples",
"href": "notebooks.html",
},
{
"title": "API reference",
"href": "root-api.html",
},
],
"navProductName": "lambeq",
"navIconLinks": [],
}
50 changes: 25 additions & 25 deletions docs/bibliography.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,52 @@
Bibliography
============

.. [AC2004] S. Abramsky, B. Coecke. `A Categorical Semantics for Quantum Protocols <https://arxiv.org/pdf/quant-ph/0402130.pdf>`_, LiCS 2004
.. [AC2004] Abramsky S, Coecke B. `A Categorical Semantics for Quantum Protocols <https://arxiv.org/pdf/quant-ph/0402130.pdf>`_, LiCS 2004
.. [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
.. [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
.. [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
.. [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
.. [CW2021] B. Coecke, V. Wang. `Grammar Equations <https://arxiv.org/pdf/2106.07485.pdf>`_, `SemSpace 2021`
.. [CW2021] Coecke B, Wang V. `Grammar Equations <https://arxiv.org/pdf/2106.07485.pdf>`_, `SemSpace 2021`
.. [FTC2020] G. de Felice, A. Toumi, B. Coecke. `DisCoPy: Monoidal Categories in Python <https://arxiv.org/pdf/2005.02975.pdf>`_, `ACT 2020`
.. [FTC2020] de Felice G, Toumi A, Coecke B. `DisCoPy: Monoidal Categories in Python <https://arxiv.org/pdf/2005.02975.pdf>`_, `ACT 2020`
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [Kar2016] D. Kartsaklis. `Coordination in Categorical Compositional Distributional Semantics <https://arxiv.org/pdf/1606.01515.pdf>`_, `SemSpace 2016`
.. [Kar2016] Kartsaklis D. `Coordination in Categorical Compositional Distributional Semantics <https://arxiv.org/pdf/1606.01515.pdf>`_, `SemSpace 2016`
.. [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
.. [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
.. [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
.. [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
.. [Lam1999] J. Lambek. Type Grammar Revisited, `Logical Aspects of Computational Linguistics`, 1999
.. [Lam1999] Lambek J. Type Grammar Revisited, `Logical Aspects of Computational Linguistics`, 1999
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [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
.. [Ste2000] M. Steedman. The Syntactic Process, MIT Press, 2000
.. [Ste2000] Steedman M. The Syntactic Process, MIT Press, 2000
.. [YK2021] R. Yeung, D. Kartsaklis. `A CCG-Based Version of the DisCoCat Framework <https://aclanthology.org/2021.semspace-1.3.pdf>`_, `SemSpace 2021`
.. [YK2021] Yeung R, Kartsaklis D. `A CCG-Based Version of the DisCoCat Framework <https://aclanthology.org/2021.semspace-1.3.pdf>`_, `SemSpace 2021`
.. [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`
.. [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`
8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
numpydoc_show_class_members = False

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

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

# CSS for allowing text wrapping within table cells
html_css_files = [
Expand Down
13 changes: 7 additions & 6 deletions docs/examples/classical-pipeline.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,14 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Epoch 5: train/loss: 0.6386 valid/loss: 0.7189 train/acc: 0.5786 valid/acc: 0.5333\n",
"Epoch 10: train/loss: 0.5280 valid/loss: 0.6392 train/acc: 0.5857 valid/acc: 0.5833\n",
"Epoch 15: train/loss: 0.4138 valid/loss: 0.4924 train/acc: 0.7500 valid/acc: 0.7500\n",
"Epoch 20: train/loss: 0.1306 valid/loss: 0.2794 train/acc: 0.9857 valid/acc: 0.9500\n",
"Epoch 25: train/loss: 0.0120 valid/loss: 0.0595 train/acc: 0.9929 valid/acc: 0.9833\n",
"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",
"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",
"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",
"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",
"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",
"\n",
"Training completed!\n"
"Training completed!\n",
"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"
]
}
],
Expand Down
Loading

0 comments on commit e012aa9

Please sign in to comment.