Coverage for src/braket/device_schema/gate_model_qpu_paradigm_properties_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 typing import List
16from pydantic import Field
18from braket.device_schema.device_connectivity import DeviceConnectivity
19from braket.schema_common import BraketSchemaBase, BraketSchemaHeader
22class GateModelQpuParadigmProperties(BraketSchemaBase):
24 """
25 This class defines the properties that are specific to ionq device
27 Attributes:
28 connectivity: defines the connectivity if a ionq device. tells the graph and connection type.
29 qubitCount: number of qubits ionq device contains
30 nativeGateSet: list of native gates
32 Examples:
33 >>> import json
34 >>> input_json = {
35 ... "braketSchemaHeader": {
36 ... "name": "braket.device_schema.gate_model_qpu_paradigm_properties",
37 ... "version": "1",
38 ... },
39 ... "qubitCount": 32,
40 ... "nativeGateSet": ["ccnot", "cy"],
41 ... "connectivity": {
42 ... "fullyConnected": False,
43 ... "connectivityGraph": {"1": ["2", "3"]},
44 ... },
45 ... }
46 >>> GateModelQpuParadigmProperties.parse_raw_schema(json.dumps(input_json))
47 """
49 _PROGRAM_HEADER = BraketSchemaHeader(
50 name="braket.device_schema.gate_model_qpu_paradigm_properties", version="1"
51 )
52 braketSchemaHeader: BraketSchemaHeader = Field(default=_PROGRAM_HEADER, const=_PROGRAM_HEADER)
53 connectivity: DeviceConnectivity
54 qubitCount: int
55 nativeGateSet: List[str]