Skip to content

Commit

Permalink
Contextuality demo (#719)
Browse files Browse the repository at this point in the history
Demo: Contextuality and inductive bias in quantum machine learning

This is a demo for my recent paper https://arxiv.org/abs/2302.01365 

In the demo we study the toy learning problem described in the paper,
and build and train a quantum model that encodes the relevant inductive
bias. The model is shown to outperform a 'generic' quantum model that
does not encode this bias.

The demo is not focused much on contextuality (because it would require
a lot of explanation), but rather focuses on the type of learning
problem (inspired from contextuality) that is presented in the paper.

JAX is used for vectorization and JIT compilation.

---------

Co-authored-by: Ivana Kurecic <[email protected]>
Co-authored-by: Guillermo Alonso-Linaje <[email protected]>
  • Loading branch information
3 people authored Sep 1, 2023
1 parent 9bc3331 commit ff8fb06
Show file tree
Hide file tree
Showing 10 changed files with 897 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demonstrations/contextuality/model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demonstrations/contextuality/rps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demonstrations/contextuality/rpstable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions demonstrations/tutorial_contextuality.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"title": "Contextuality and inductive bias in QML",
"authors": [
{
"id": "joseph_bowles"
}
],
"dateOfPublication": "2023-09-06T00:00:00+00:00",
"dateOfLastModification": "2023-09-06T00:00:00+00:00",
"categories": [
"Quantum Machine Learning"
],
"tags": [],
"previewImages": [
{
"type": "thumbnail",
"uri": "/_images/thumbnail_tutorial_Contextuality.png"
},
{
"type": "large_thumbnail",
"uri": "/_static/large_demo_thumbnails/thumbnail_large_Contextuality.png"
}
],
"seoDescription": "Train a problem-inspired ansatz on a contextuality-inspired dataset.",
"doi": "",
"canonicalURL": "/qml/demos/tutorial_contextuality",
"references": [
{
"id": "paper",
"type": "article",
"title": "Contextuality and inductive bias in quantum machine learning.",
"authors": "J. Bowles, V. J. Wright, M. Farkas, N. Killoran, M. Schuld",
"year": "2023",
"journal": "",
"url": "https://arxiv.org/abs/2302.01365"
},
{
"id": "contextuality",
"type": "article",
"title": "Contextuality for preparations, transformations, and unsharp measurements.",
"authors": "R. W. Spekkens",
"year": "2005",
"journal": "Phys. Rev. A 71",
"url": "https://journals.aps.org/pra/abstract/10.1103/PhysRevA.71.052108"
},
{
"id": "reptheory",
"type": "article",
"title": "Representation Theory for Geometric Quantum Machine Learning.",
"authors": "M. Ragone, P. Braccia, Q. T. Nguyen, L. Schatzki, P. J. Coles, F. Sauvage, M. Larocca, M. Cerezo",
"year": "2023",
"journal": "",
"url": "https://arxiv.org/abs/2210.07980"
},
{
"id": "equivariant",
"type": "article",
"title": "Theory for Equivariant Quantum Neural Networks.",
"authors": "Q. T. Nguyen, L. Schatzki, P. Braccia, M. Ragone, P. J. Coles, F. Sauvage, M. Larocca, M. Cerezo",
"year": "2022",
"journal": "",
"url": "https://arxiv.org/abs/2210.08566"
},
{
"id": "surrogates",
"type": "article",
"title": "Classical surrogates for quantum learning models.",
"authors": "F. J. Schreiber, J. Eiser, J. J. Meyer",
"year": "2022",
"journal": "",
"url": "https://arxiv.org/abs/2206.11740"
}
],
"basedOnPapers": [],
"referencedByPapers": [],
"relatedContent": [
{
"type": "demonstration",
"id": "tutorial_geometric_qml",
"weight": 1.0
}
]
}
Loading

0 comments on commit ff8fb06

Please sign in to comment.