Coverage for src/braket/device_schema/ionq/ionq_device_parameters_v1.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# Copyright 2019-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"). You
4# may not use this file except in compliance with the License. A copy of
5# the License is located at
6#
7# http://aws.amazon.com/apache2.0/
8#
9# or in the "license" file accompanying this file. This file is
10# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11# ANY KIND, either express or implied. See the License for the specific
12# language governing permissions and limitations under the License.
14from pydantic import Field
16from braket.device_schema.gate_model_parameters_v1 import GateModelParameters
17from braket.schema_common import BraketSchemaBase, BraketSchemaHeader
20class IonqDeviceParameters(BraketSchemaBase):
21 """
22 This defines the parameters common to all the Ion-Q devices.
24 Attributes:
25 paradigmParameters: Parameters that are common to gatemodel paradigm
27 Examples:
28 >>> import json
29 >>> input_json = {
30 ... "braketSchemaHeader": {
31 ... "name": "braket.device_schema.ionq.ionq_device_parameters",
32 ... "version": "1",
33 ... },
34 ... "paradigmParameters": {"braketSchemaHeader": {
35 ... "name": "braket.device_schema.gate_model_parameters",
36 ... "version": "1",
37 ... },"qubitCount": 1},
38 ... }
39 >>> IonqDeviceParameters.parse_raw_schema(json.dumps(input_json))
40 """
42 _PROGRAM_HEADER = BraketSchemaHeader(
43 name="braket.device_schema.ionq.ionq_device_parameters", version="1"
44 )
45 braketSchemaHeader: BraketSchemaHeader = Field(default=_PROGRAM_HEADER, const=_PROGRAM_HEADER)
46 paradigmParameters: GateModelParameters