Hide keyboard shortcuts

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. 

13 

14from pydantic import BaseModel 

15 

16 

17class DeviceConnectivity(BaseModel): 

18 

19 """ 

20 This schema defines the common properties that need to be existent if a connection is defined. 

21 

22 Attributes: 

23 

24 fullyConnected: If each qubit is connected to all other qubits then it called fully connected. 

25 true if fully connected else it will be false. 

26 

27 connectivityGraph: It defines for each qubit what are the connected qubits. 

28 For a fullyConnected graph it will be empty since all the qubits are connected to each other 

29 

30 

31 Examples: 

32 >>> import json 

33 >>> input_json = { 

34 ... "fullyConnected": False, 

35 ... "connectivityGraph": {"1": ["2", "3"]}, 

36 ... } 

37 >>> DeviceConnectivity.parse_raw(json.dumps(input_json)) 

38 """ 

39 

40 fullyConnected: bool 

41 connectivityGraph: dict