diff --git a/_static/hardware_logos/aws.png b/_static/hardware_logos/aws.png new file mode 100644 index 0000000000..5d0e78ac3a Binary files /dev/null and b/_static/hardware_logos/aws.png differ diff --git a/demonstrations/tutorial_qubit_rotation.metadata.json b/demonstrations/tutorial_qubit_rotation.metadata.json index 83cf4746a3..5ebff321db 100644 --- a/demonstrations/tutorial_qubit_rotation.metadata.json +++ b/demonstrations/tutorial_qubit_rotation.metadata.json @@ -39,5 +39,12 @@ "id": "tutorial_state_preparation", "weight": 1.0 } + ], + "hardware": [ + { + "id": "aws", + "link": "https://pennylane.ai/qml/demos/tutorial_qubit_rotation", + "logo": "/_static/hardware_logos/aws.png" + } ] } diff --git a/demonstrations_metadata.md b/demonstrations_metadata.md index 8cd24ce48c..11865a9f40 100644 --- a/demonstrations_metadata.md +++ b/demonstrations_metadata.md @@ -58,6 +58,13 @@ Below is given an example of a complete metadata file for a demonstration. "id": "tutorial_qubit_rotation", "weight": 1.0 } + ], + "hardware": [ + { + "id": "aws", + "link": "https://pennylane.ai/qml/demos/tutorial_quantum_transfer_learning", + "logo": "/_static/hardware_logos/aws.png" + } ] } ``` @@ -84,6 +91,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 @@ -125,6 +133,14 @@ 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 | `enum` | The ID 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. | + @@ -202,7 +218,9 @@ The table below gives details about the fields in the metadata JSON file for ver "id": "", "weight": 1.0 } - ] + ], + "relatedContent": [], + "hardware": [] } ``` diff --git a/metadata_schemas/demo.metadata.schema.0.1.0.json b/metadata_schemas/demo.metadata.schema.0.1.0.json index 3a7e28b7fd..7c6c628140 100644 --- a/metadata_schemas/demo.metadata.schema.0.1.0.json +++ b/metadata_schemas/demo.metadata.schema.0.1.0.json @@ -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": [ diff --git a/metadata_schemas/objects/hardware.schema.0.1.0.json b/metadata_schemas/objects/hardware.schema.0.1.0.json new file mode 100644 index 0000000000..fefe1e9854 --- /dev/null +++ b/metadata_schemas/objects/hardware.schema.0.1.0.json @@ -0,0 +1,25 @@ +{ + "$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", + "enum": ["aws"] + }, + "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", "link", "logo" + ] +} \ No newline at end of file