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

Add hardware section to metadata #927

Merged
merged 9 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
Binary file added _static/hardware_logos/aws.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion demonstrations/tutorial_quantum_transfer_learning.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,13 @@
],
"basedOnPapers": [],
"referencedByPapers": [],
"relatedContent": []
"relatedContent": [],
"hardware": [
{
"id": "aws",
"name": "Amazon",
"link": "https://pennylane.ai/qml/demos/tutorial_quantum_transfer_learning",
"logo": "/_static/hardware_logos/aws.png"
}
]
}
10 changes: 9 additions & 1 deletion demonstrations/tutorial_quanvolution.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,13 @@
],
"basedOnPapers": [],
"referencedByPapers": [],
"relatedContent": []
"relatedContent": [],
"hardware": [
{
"id": "aws",
"name": "Amazon",
"link": "https://pennylane.ai/qml/demos/tutorial_quanvolution",
"logo": "/_static/hardware_logos/aws.png"
}
]
}
8 changes: 8 additions & 0 deletions demonstrations/tutorial_qubit_rotation.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,13 @@
"id": "tutorial_state_preparation",
"weight": 1.0
}
],
"hardware": [
{
"id": "aws",
"name": "Amazon",
LucasSilbernagel marked this conversation as resolved.
Show resolved Hide resolved
"link": "https://pennylane.ai/qml/demos/tutorial_qubit_rotation",
"logo": "/_static/hardware_logos/aws.png"
}
]
}
8 changes: 8 additions & 0 deletions demonstrations/tutorial_variational_classifier.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,13 @@
"id": "ensemble_multi_qpu",
"weight": 1.0
}
],
"hardware": [
{
"id": "aws",
"name": "Amazon",
"link": "https://pennylane.ai/qml/demos/tutorial_variational_classifier",
"logo": "/_static/hardware_logos/aws.png"
}
]
}
22 changes: 21 additions & 1 deletion demonstrations_metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ Below is given an example of a complete metadata file for a demonstration.
"id": "tutorial_qubit_rotation",
"weight": 1.0
}
],
"hardware": [
{
"id": "aws",
"name": "Amazon",
"link": "https://pennylane.ai/qml/demos/tutorial_quantum_transfer_learning",
"logo": "/_static/hardware_logos/aws.png"
}
]
}
```
Expand All @@ -84,6 +92,7 @@ The table below gives details about the fields in the metadata JSON file for ver
| `basedOnPapers` | Yes, but can be an empty array | `array` of `string` | An array of the DOIs for the papers this demo is based on. |
| `referencedByPapers` | Yes, but can be an empty array | `array` of `string` | An array of the DOIs of any papers that reference this demo. |
| `relatedContent` | Yes, but can be an empty array | `array` of `object` | An array of objects describing the content related to this demo. See below for the object structure. |
| `hardware` | No. Can be an empty array. | `array` of `object` | An array of objects representing third-party vendors who can run the demo on their hardware. See below for the object structure. |

### Author Object Properties

Expand Down Expand Up @@ -125,6 +134,15 @@ The table below gives details about the fields in the metadata JSON file for ver
| `id` | Yes | `string` | The id of the content that this relation refers to. For demos, it's the file name of the demo without the extension - i.e., `tutorial_haar_measure`. |
| `weight` | Yes | `number` | A number between -1.0 and 1.0 indicating both how closely related these two pieces of content are, and which one it is preferable to encounter first. A value of 1.0 indicates that these two pieces of content are *very* closely related, and this one should be read first, and the linked one second. A value of -1.0 indicates again that these two pieces of content are very closely related, but that the linked one should be read first. A value of 0.0 indicates that these two pieces of content have nothing to do with each other. |

### Hardware Object Properties

| Name | Is Required | Value Type | Description |
|---|---|---|---|
| `id` | Yes | `string` | The ID of the hardware vendor |
| `name` | Yes | `string` | The name of the hardware vendor |
| `link` | Yes | `string` | Link to run the demo on the vendor's hardware |
| `logo` | Yes | `string` | The URI of the vendor's logo image, whether it be something hosted locally or on another site. |




Expand Down Expand Up @@ -202,7 +220,9 @@ The table below gives details about the fields in the metadata JSON file for ver
"id": "",
"weight": 1.0
}
]
],
"relatedContent": [],
"hardware": []
}
```

Expand Down
7 changes: 7 additions & 0 deletions metadata_schemas/demo.metadata.schema.0.1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@
"items": {
"$ref": "file:./objects/related.content.schema.0.1.0.json"
}
},
"hardware": {
"description": "An array of objects representing third-party vendors who can run the demo on their hardware. An empty array is allowed.",
"type": "array",
"items": {
"$ref": "file:./objects/hardware.schema.0.1.0.json"
}
}
},
"required": [
Expand Down
29 changes: 29 additions & 0 deletions metadata_schemas/objects/hardware.schema.0.1.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "hardware.schema.0.1.0.json",
"title": "Hardware",
"description": "Hardware vendors that can run the demo on their hardware",
"type": "object",
"properties": {
"id": {
"description": "The ID of the hardware vendor",
"type": "string"
},
"name": {
"description": "The name of the hardware vendor",
"type": "string"
},
"link": {
"description": "Link to run the demo on the vendor's hardware",
"type": "string"
},
"logo": {
"description": "The URI of the vendor's logo image, whether it be something hosted locally or on another site.",
"type": "string",
"format": "uri-reference"
}
},
"required": [
"id", "name", "link", "logo"
]
}